We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e980ed0 commit 57f3a14Copy full SHA for 57f3a14
CMakeLists.txt
@@ -1,6 +1,9 @@
1
cmake_minimum_required(VERSION 3.7.2)
2
project(ghcfilesystem)
3
4
+option(BUILD_TESTING "Enable tests" ON)
5
+option(BUILD_EXAMPLES "Build examples" ON)
6
+
7
if(NOT DEFINED CMAKE_CXX_STANDARD)
8
set(CMAKE_CXX_STANDARD 11)
9
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -28,9 +31,15 @@ if(NOT hasParent)
28
31
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
29
32
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
30
33
include(GhcHelper)
- enable_testing()
- add_subdirectory(test)
- add_subdirectory(examples)
34
35
+ if(BUILD_TESTING)
36
+ enable_testing()
37
+ add_subdirectory(test)
38
+ endif()
39
40
+ if(BUILD_EXAMPLES)
41
+ add_subdirectory(examples)
42
43
endif()
44
45
include(CMakePackageConfigHelpers)
0 commit comments