-
Notifications
You must be signed in to change notification settings - Fork 0
Stop googletest in subprojects #17
Copy link
Copy link
Labels
Description
Problem
- In the example folder, the cmake file fetches GPUtils.
- This causes a further fetch of googletest.
- Then googletest slows down the building process of the example project.
- We need to prevent gtest either from getting into the fetch or from being built by the example project.
Current solution
Make a release branch, and comment out the second part of the root CMakeLists.txt file
Proper solution
Use flags to default=OFF the debug parts of CMakeLists.txt file:
if(NOT GPUTILS_BUILD_TESTING)
set(GPUTILS_BUILD_TESTING OFF)
endif()
if (GPUTILS_BUILD_TESTING)
add_subdirectory(tests)
endif()
unset(GPUTILS_BUILD_TESTING CACHE)Then, when building, pass the flag setting you want. For example, in the ci script
cmake -S . -B ./build -Wno-dev -DGPUTILS_BUILD_TESTING=ONReactions are currently unavailable