From e08a79f4daa5ab1ce03cb27ce453b8dbf5d4cb1a Mon Sep 17 00:00:00 2001 From: Thomas Lindner Date: Sun, 6 Nov 2022 04:15:16 +0100 Subject: [PATCH] get rid of GlobalOptions.cmake --- CMakeLists.txt | 1 - cmake/GlobalOptions.cmake | 3 --- src/CMakeLists.txt | 8 ++++++++ 3 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 cmake/GlobalOptions.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index b6f55ff..bbddb01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") #find_package(foo REQUIRED) include(AddAutoformatTarget) -include(GlobalOptions) include(GNUInstallDirs) add_subdirectory(src) diff --git a/cmake/GlobalOptions.cmake b/cmake/GlobalOptions.cmake deleted file mode 100644 index 4a60557..0000000 --- a/cmake/GlobalOptions.cmake +++ /dev/null @@ -1,3 +0,0 @@ -add_compile_options($<$,$,$>:-Wall -Wextra>) -set(CMAKE_CXX_STANDARD 20) -#set(CMAKE_CXX_CLANG_TIDY clang-tidy --config=) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c705a3f..d835b44 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,5 +9,13 @@ target_include_directories(${PROJECT_NAME} $ $ ) +target_compile_features(${PROJECT_NAME} + PUBLIC + cxx_std_20 +) +target_compile_options(${PROJECT_NAME} + PRIVATE + $<$,$,$>:-Wall -Wextra> +) add_autoformat_target(${PROJECT_NAME})