Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.15.0)

project(LocalSearchSolver LANGUAGES CXX)

# Options.
# Build options.
option(LOCALSEARCHSOLVER_BUILD_TEST "Build unit tests" ON)
option(LOCALSEARCHSOLVER_BUILD_EXAMPLES "Build examples" ON)

# Avoid FetchContent warning.
Expand All @@ -17,7 +18,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Add sub-directories.
add_subdirectory(extern)
add_subdirectory(src)
add_subdirectory(test)
if(LOCALSEARCHSOLVER_BUILD_TEST)
add_subdirectory(test)
endif()
if(LOCALSEARCHSOLVER_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
24 changes: 18 additions & 6 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# Enable FetchContent.
include(FetchContent)

# Fetch fontanf/orproblems.
# Fetch fontanf/optimizationtools.
set(OPTIMIZATIONTOOLS_BUILD_TEST OFF)
FetchContent_Declare(
orproblems
GIT_REPOSITORY https://github.com/fontanf/orproblems.git
GIT_TAG ba099d6bd0ac186e4113fe340789a1800fa72852)
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../orproblems/")
FetchContent_MakeAvailable(orproblems)
optimizationtools
GIT_REPOSITORY https://github.com/fontanf/optimizationtools.git
GIT_TAG e8c379203792fcad764cce239986b325619475fd
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../optimizationtools/"
EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(optimizationtools)

# Fetch fontanf/orproblems.
if(LOCALSEARCHSOLVER_BUILD_EXAMPLES)
FetchContent_Declare(
orproblems
GIT_REPOSITORY https://github.com/fontanf/orproblems.git
GIT_TAG ba099d6bd0ac186e4113fe340789a1800fa72852)
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../orproblems/")
FetchContent_MakeAvailable(orproblems)
endif()
Loading