File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed
Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.15.0)
22
33project (LocalSearchSolver LANGUAGES CXX)
44
5- # Options.
5+ # Build options.
6+ option (LOCALSEARCHSOLVER_BUILD_TEST "Build unit tests" ON )
67option (LOCALSEARCHSOLVER_BUILD_EXAMPLES "Build examples" ON )
78
89# Avoid FetchContent warning.
@@ -17,7 +18,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1718# Add sub-directories.
1819add_subdirectory (extern)
1920add_subdirectory (src)
20- add_subdirectory (test )
21+ if (LOCALSEARCHSOLVER_BUILD_TEST)
22+ add_subdirectory (test )
23+ endif ()
2124if (LOCALSEARCHSOLVER_BUILD_EXAMPLES)
2225 add_subdirectory (examples)
2326endif ()
Original file line number Diff line number Diff line change 11# Enable FetchContent.
22include (FetchContent)
33
4- # Fetch fontanf/orproblems.
4+ # Fetch fontanf/optimizationtools.
5+ set (OPTIMIZATIONTOOLS_BUILD_TEST OFF )
56FetchContent_Declare(
6- orproblems
7- GIT_REPOSITORY https://github.com/fontanf/orproblems.git
8- GIT_TAG ba099d6bd0ac186e4113fe340789a1800fa72852)
9- #SOURCE_DIR "${PROJECT_SOURCE_DIR}/../orproblems/")
10- FetchContent_MakeAvailable(orproblems)
7+ optimizationtools
8+ GIT_REPOSITORY https://github.com/fontanf/optimizationtools.git
9+ GIT_TAG e8c379203792fcad764cce239986b325619475fd
10+ #SOURCE_DIR "${PROJECT_SOURCE_DIR}/../optimizationtools/"
11+ EXCLUDE_FROM_ALL )
12+ FetchContent_MakeAvailable(optimizationtools)
13+
14+ # Fetch fontanf/orproblems.
15+ if (LOCALSEARCHSOLVER_BUILD_EXAMPLES)
16+ FetchContent_Declare(
17+ orproblems
18+ #GIT_REPOSITORY https://github.com/fontanf/orproblems.git
19+ #GIT_TAG ba099d6bd0ac186e4113fe340789a1800fa72852)
20+ SOURCE_DIR "${PROJECT_SOURCE_DIR} /../orproblems/" )
21+ FetchContent_MakeAvailable(orproblems)
22+ endif ()
You can’t perform that action at this time.
0 commit comments