Skip to content

Commit 168928e

Browse files
committed
Depend on gtest only when building tests
1 parent c679907 commit 168928e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ target_sources(args INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/args/args.hxx")
3737
target_include_directories(args INTERFACE args)
3838

3939
# Google Test framework
40-
if(NOT TARGET gtest)
40+
if(BUILD_TESTING AND NOT TARGET gtest)
4141
add_subdirectory(gtest EXCLUDE_FROM_ALL)
4242
endif()

0 commit comments

Comments
 (0)