Skip to content

Commit cb43dd3

Browse files
committed
Switch to cmake
1 parent 7377504 commit cb43dd3

39 files changed

+918
-441
lines changed

CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.15.0)
2+
3+
project(ORProblems LANGUAGES CXX)
4+
5+
# Require C++14.
6+
set(CMAKE_CXX_STANDARD 14)
7+
8+
# Enable output of compile commands during generation.
9+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
10+
11+
# Add sub-directories.
12+
add_subdirectory(extern)
13+
add_subdirectory(src)
14+
add_subdirectory(test)

WORKSPACE

Lines changed: 0 additions & 77 deletions
This file was deleted.

extern/CMakeLists.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Enable FetchContent.
2+
include(FetchContent)
3+
4+
# Fetch boost.
5+
set(BOOST_INCLUDE_LIBRARIES thread filesystem system program_options)
6+
set(BOOST_ENABLE_CMAKE ON)
7+
include(FetchContent)
8+
FetchContent_Declare(
9+
Boost
10+
GIT_REPOSITORY https://github.com/boostorg/boost.git
11+
GIT_TAG boost-1.84.0
12+
GIT_SHALLOW TRUE
13+
)
14+
FetchContent_MakeAvailable(Boost)
15+
16+
# Fetch fontanf/optimizationtools.
17+
FetchContent_Declare(
18+
optimizationtools
19+
GIT_REPOSITORY https://github.com/fontanf/optimizationtools.git
20+
GIT_TAG 33a3966ece149d390ec7ce08699669b5267e64aa)
21+
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../optimizationtools/")
22+
FetchContent_MakeAvailable(optimizationtools)
23+
24+
# Fetch fontanf/optimizationtools.
25+
FetchContent_Declare(
26+
travelingsalesmansolver
27+
GIT_REPOSITORY https://github.com/fontanf/travelingsalesmansolver.git
28+
GIT_TAG 034ec06a797451e05ee3b99a5885261b18ab229f)
29+
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../travelingsalesmansolver/")
30+
FetchContent_MakeAvailable(travelingsalesmansolver)
31+
32+
# Fetch 5cript/interval-tree.
33+
FetchContent_Declare(
34+
interval-tree
35+
GIT_REPOSITORY https://github.com/5cript/interval-tree.git
36+
GIT_TAG a1b6a498b7bb2e611f547de16ee0a666f4d5c20f)
37+
FetchContent_MakeAvailable(interval-tree)

0 commit comments

Comments
 (0)