aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--lib/CMakeLists.txt8
-rw-r--r--lib/fmt/CMakeLists.txt3
-rw-r--r--src/CMakeLists.txt4
4 files changed, 14 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 481d035..66bad3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.2.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
-set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD 20)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 16c32fd..58dfd29 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -7,3 +7,11 @@ FetchContent_Declare(
)
add_subdirectory(ctre)
+
+FetchContent_Declare(
+ fmt
+ GIT_REPOSITORY "https://github.com/fmtlib/fmt"
+ GIT_TAG 8.1.1
+)
+
+add_subdirectory(fmt)
diff --git a/lib/fmt/CMakeLists.txt b/lib/fmt/CMakeLists.txt
new file mode 100644
index 0000000..d3f9f25
--- /dev/null
+++ b/lib/fmt/CMakeLists.txt
@@ -0,0 +1,3 @@
+message(STATUS "Fetching fmt...")
+
+FetchContent_MakeAvailable(fmt)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7e668ed..a32942b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -21,7 +21,7 @@ file(GLOB SOURCES
add_executable(${PROJECT_NAME} ${SOURCES})
-target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
+target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
target_compile_options(
${PROJECT_NAME}
@@ -40,6 +40,6 @@ target_compile_options(
target_include_directories(${PROJECT_NAME} PRIVATE .)
-target_link_libraries_system(${PROJECT_NAME} ctre)
+target_link_libraries_system(${PROJECT_NAME} ctre fmt)
target_link_options(${PROJECT_NAME} PRIVATE -fsanitize=address)