39 lines
1.3 KiB
CMake
39 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.25)
|
|
project(dynamic_program CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DGAME_STATE_NO_TABLEBASE_LOOKUP")
|
|
|
|
include_directories(
|
|
${PROJECT_SOURCE_DIR}/include
|
|
)
|
|
|
|
find_package(cpr)
|
|
find_package(Boost 1.81 COMPONENTS program_options REQUIRED)
|
|
|
|
include_directories(.)
|
|
include_directories(${Boost_INCLUDE_DIR})
|
|
|
|
add_executable(endgame-analyzer src/main.cpp src/state_explorer.cpp src/download.cpp
|
|
include/null_buffer.h
|
|
include/command_line_interface.h
|
|
src/command_line_interface.cpp
|
|
include/parse_game.h
|
|
src/parse_game.cpp
|
|
include/hanabi_types.hpp
|
|
include/game_interface.h
|
|
src/hanabi_types.cpp
|
|
src/game_interface.cpp
|
|
include/make_state.h
|
|
src/make_state.cpp
|
|
)
|
|
|
|
target_link_libraries(endgame-analyzer cpr)
|
|
target_link_libraries(endgame-analyzer Boost::program_options)
|
|
target_link_libraries(endgame-analyzer readline)
|
|
|
|
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
|
|
# This enables assertions in the RelWithDebInfo build type (assuming gcc or clang)
|
|
string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|