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-11-14 13:19:33 +01:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DGAME_STATE_NO_TABLEBASE_LOOKUP")
|
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
|
|
|
include/null_buffer.h
|
|
|
|
include/command_line_interface.h
|
2023-11-15 21:47:50 +01:00
|
|
|
src/command_line_interface.cpp
|
|
|
|
include/parse_game.h
|
|
|
|
src/parse_game.cpp
|
2023-11-15 22:58:09 +01:00
|
|
|
include/hanabi_types.hpp
|
|
|
|
include/game_interface.h
|
|
|
|
src/hanabi_types.cpp
|
|
|
|
src/game_interface.cpp
|
2023-11-16 15:54:50 +01:00
|
|
|
include/make_state.h
|
|
|
|
src/make_state.cpp
|
2023-11-15 21:47:50 +01:00
|
|
|
)
|
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}")
|