-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
34 lines (23 loc) · 1.12 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cmake_minimum_required(VERSION 3.14)
project(fierymud)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_compile_options(-Werror -Wno-format-overflow -Wno-format-truncation -Wno-write-strings -Wno-unused-variable)
# add_compile_options(-Werror -Wall -Wextra) # Ideal end state
# Load Third Party libraries.
include(cmake/CPM.cmake)
CPMAddPackage("gh:fmtlib/fmt#9.1.0")
CPMAddPackage("gh:nlohmann/[email protected]")
# CPMAddPackage("gh:catchorg/[email protected]")
# CPMAddPackage("gh:OlivierLDff/asio.cmake#asio-1-24-0")
include(cmake/version.cmake)
# Regardless of the CMake settings, I always want us to have debug information available.
add_compile_options(-g)
# TODO: Fix code so these don't instantly crash the mud.
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=leak -fsanitize=address -fsanitize=undefined ")
set(CMAKE_C_COMPILER gcc)
include_directories(include)
FILE(GLOB sources src/*.cpp)
add_executable(fierymud ${sources})
target_link_libraries(fierymud PRIVATE version crypt fmt::fmt nlohmann_json::nlohmann_json)# asio::asio)
install (TARGETS fierymud DESTINATION bin)