Skip to content

Commit ffb88f5

Browse files
committed
Remove unnecessary condition for enabling tests in top-level CMakeLists.txt
1 parent 5745f3f commit ffb88f5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ option(MYLIB_BUILD_TESTS "Build mylib tests" OFF)
2121
option(MYLIB_BUILD_EXAMPLES "Build mylib examples" OFF)
2222
option(MYLIB_BUILD_DOCS "Build mylib documentation" OFF)
2323
option(MYLIB_INSTALL "Generate target for installing mylib" ${is_top_level})
24-
set_if_undefined(MYLIB_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/mylib-${PROJECT_VERSION}" CACHE
25-
STRING "Install path for mylib package-related CMake files")
24+
set_if_undefined(MYLIB_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/mylib-${PROJECT_VERSION}" CACHE STRING
25+
"Install path for mylib package-related CMake files")
2626

2727
if(DEFINED MYLIB_SHARED_LIBS)
2828
set(BUILD_SHARED_LIBS ${MYLIB_SHARED_LIBS})
@@ -145,10 +145,7 @@ endif()
145145
#----------------------------------------------------------------------------------------------------------------------
146146

147147
if(MYLIB_BUILD_TESTS)
148-
if(is_top_level)
149-
enable_testing()
150-
endif()
151-
148+
enable_testing()
152149
add_subdirectory(tests)
153150
endif()
154151

0 commit comments

Comments
 (0)