-
Notifications
You must be signed in to change notification settings - Fork 970
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace BUILD_TESTS CMake option with ENABLE_TESTS variable which all…
…ows to specify multiple test types
- Loading branch information
1 parent
9971ff5
commit d2117d7
Showing
4 changed files
with
20 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
if("unit" IN_LIST ENABLE_TESTS) | ||
enable_testing() | ||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_package(Threads REQUIRED) | ||
|
||
find_package(Threads REQUIRED) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # v1.14.0 | ||
GIT_SHALLOW TRUE | ||
) | ||
FetchContent_MakeAvailable(googletest) | ||
|
||
include(FetchContent) | ||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # v1.14.0 | ||
GIT_SHALLOW TRUE | ||
) | ||
FetchContent_MakeAvailable(googletest) | ||
include(GoogleTest) | ||
|
||
include(GoogleTest) | ||
|
||
add_subdirectory(UnitTests) | ||
add_subdirectory(UnitTests) | ||
endif() |