File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -11,31 +11,32 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
11
11
include (cmake/CPM.cmake )
12
12
message ("CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} " )
13
13
14
- option (BUILD_EXAMPLES "Build examples" ON )
15
- option (BUILD_TESTS "Build tests" ON )
16
- option (BUILD_FOR_DOCUMENTATION_IMAGES "Bypass wait() commands and save figures as .svg at destruction" OFF )
14
+ if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR} )
15
+ set (MASTER_PROJECT ON )
16
+ else ()
17
+ set (MASTER_PROJECT OFF )
18
+ endif ()
19
+ set (MATPLOT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
17
20
18
- option (BUILD_EXPERIMENTAL_OPENGL_BACKEND "Compile target with the experimental OpenGL backend" OFF )
21
+ option (BUILD_EXAMPLES "Build examples" ${MASTER_PROJECT} )
22
+ option (BUILD_TESTS "Build tests" ${MASTER_PROJECT} )
19
23
20
- option (BUILD_HIGH_RESOLUTION_WORLD_MAP "Compile the high resolution maps for geoplots" ON )
21
24
option (BUILD_SHARED_LIBS "Build shared libraries" OFF )
22
25
26
+ option (BUILD_HIGH_RESOLUTION_WORLD_MAP "Compile the high resolution maps for geoplots" ON )
27
+ option (BUILD_FOR_DOCUMENTATION_IMAGES "Bypass wait() commands and save figures as .svg at destruction" OFF )
28
+ option (BUILD_EXPERIMENTAL_OPENGL_BACKEND "Compile target with the experimental OpenGL backend" OFF )
29
+
23
30
option (WITH_SYSTEM_CIMG "Use system-provided CImg.h instead of bundled" OFF )
24
31
option (WITH_SYSTEM_NODESOUP "Use system-provided nodesoup instead of bundled" OFF )
25
32
26
- if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR} )
27
- set (MASTER_PROJECT ON )
28
- else ()
29
- set (MASTER_PROJECT OFF )
30
- endif ()
31
- set (MATPLOT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
32
33
33
34
add_subdirectory (source )
34
35
35
36
if (MASTER_PROJECT )
36
37
if (BUILD_EXAMPLES )
37
38
add_subdirectory (examples )
38
- endif ()
39
+ endif ()
39
40
if (BUILD_TESTS )
40
41
add_subdirectory (test )
41
42
endif ()
Original file line number Diff line number Diff line change @@ -2069,7 +2069,7 @@ cmake --build . -j 2 --config Release
2069
2069
``` bash
2070
2070
mkdir build
2071
2071
cmake -version
2072
- cmake .. -DCMAKE_BUILD_TYPE=Release
2072
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -BUILD_TESTS=OFF
2073
2073
cmake --build . -j 2 --config Release
2074
2074
cmake --install
2075
2075
```
You can’t perform that action at this time.
0 commit comments