diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-27 16:07:30 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:53 +0200 |
commit | 6964d48c970e5f7b11897096c816271785af23ac (patch) | |
tree | df9e50fbe167de4aed9df1bef8e395a28109c344 | |
parent | 2bcf699b9e11ccf848393882257fc3986bd28e45 (diff) |
build: add fmt library dependency
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | lib/CMakeLists.txt | 8 | ||||
-rw-r--r-- | lib/fmt/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 |
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) |