2023-08-05 11:55:55 +02:00
|
|
|
cmake_minimum_required(VERSION 3.25)
|
|
|
|
project(dynamic_program CXX)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2023-09-19 19:25:27 +02:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror")
|
2023-08-06 15:02:50 +02:00
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
|
2023-08-05 11:55:55 +02:00
|
|
|
|
2023-08-12 11:44:56 +02:00
|
|
|
include_directories(
|
|
|
|
${PROJECT_SOURCE_DIR}/include
|
|
|
|
)
|
|
|
|
|
2023-08-05 11:55:55 +02:00
|
|
|
find_package(cpr)
|
2023-08-12 11:44:56 +02:00
|
|
|
find_package(Boost 1.81 COMPONENTS program_options REQUIRED)
|
2023-08-05 11:55:55 +02:00
|
|
|
|
|
|
|
include_directories(.)
|
2023-08-12 11:44:56 +02:00
|
|
|
include_directories(${Boost_INCLUDE_DIR})
|
2023-08-05 11:55:55 +02:00
|
|
|
|
2023-11-12 14:58:25 +01:00
|
|
|
add_executable(endgame-analyzer src/main.cpp src/state_explorer.cpp src/download.cpp
|
2023-11-12 17:30:44 +01:00
|
|
|
src/game_state.cpp
|
|
|
|
include/null_buffer.h
|
|
|
|
include/command_line_interface.h
|
|
|
|
src/command_line_interface.cpp)
|
2023-08-05 11:55:55 +02:00
|
|
|
|
2023-08-12 11:44:56 +02:00
|
|
|
target_link_libraries(endgame-analyzer cpr)
|
|
|
|
target_link_libraries(endgame-analyzer Boost::program_options)
|
2023-09-19 19:25:27 +02:00
|
|
|
target_link_libraries(endgame-analyzer readline)
|
2023-08-05 11:55:55 +02:00
|
|
|
|
2023-08-08 16:27:25 +02:00
|
|
|
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
|
2023-11-11 13:48:55 +01:00
|
|
|
# This enables assertions in the RelWithDebInfo build type (assuming gcc or clang)
|
|
|
|
string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|