fix: only build tests if top level
This commit was merged in pull request #10.
This commit is contained in:
@@ -3,7 +3,6 @@ project(curtle VERSION 0.1.1 LANGUAGES C)
|
|||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
include(CTest)
|
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
@@ -54,7 +53,7 @@ install(FILES
|
|||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/curtle
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/curtle
|
||||||
)
|
)
|
||||||
|
|
||||||
if(BUILD_TESTING)
|
if(${PROJECT_IS_TOP_LEVEL})
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
Reference in New Issue
Block a user