We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51e45d2 commit 0310a6bCopy full SHA for 0310a6b
CMakeLists.txt
@@ -1,7 +1,5 @@
1
cmake_minimum_required(VERSION 3.0)
2
-project(linq)
3
-
4
-enable_testing()
+project(linq CXX)
5
6
find_package(Boost)
7
@@ -37,6 +35,10 @@ install(FILES
37
35
install(FILES linq.h DESTINATION include)
38
36
install(DIRECTORY linq DESTINATION include)
39
40
-add_executable(linq-test test.cpp)
41
-target_link_libraries(linq-test linq ${Boost_test_LIBRARY_RELEASE})
42
-add_test(NAME linq-test COMMAND linq-test)
+include(CTest)
+
+if (BUILD_TESTING)
+ add_executable(linq-test test.cpp)
+ target_link_libraries(linq-test linq ${Boost_test_LIBRARY_RELEASE})
43
+ add_test(NAME linq-test COMMAND linq-test)
44
+endif (BUILD_TESTING)
0 commit comments