Skip to content

Commit 8234b0b

Browse files
committed
cmake: cleaned up & updated to new std dependency
1 parent 7834327 commit 8234b0b

File tree

2 files changed

+9
-66
lines changed

2 files changed

+9
-66
lines changed

CMakeLists.txt

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
# #
1616
#[[ CMAKE STRUCTURE: ]]#
1717
# - Project setup #
18-
# - Configure dependencies: #
19-
# - Pack-TL #
18+
# - Configure dependencies #
2019
# - Configure Quantify<> #
2120
# - Configure tests #
2221
# - Configure Doxygen documentation #
@@ -49,18 +48,15 @@ endif ()
4948
# Use `-DCMAKE_BUILD_TYPE=` to override this.
5049
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
5150

52-
cmake_minimum_required(VERSION 3.29.20240518 FATAL_ERROR)
51+
cmake_minimum_required(VERSION 3.30 FATAL_ERROR)
5352
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
54-
project(quantify LANGUAGES CXX C)
55-
53+
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "0e5b6991-d74f-4b3d-a41c-cf096e0b2508")
54+
set(CMAKE_CXX_MODULE_STD ON)
5655
set(CMAKE_CXX_STANDARD 23)
57-
set(CMAKE_CXX_STANDARD_REQUIRED YES)
58-
set(CMAKE_CXX_EXTENSIONS OFF)
59-
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmodules-ts -std=c++23")
60-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
56+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
57+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -pthread")
6158

62-
message("CMAKE VERSION: " ${CMAKE_VERSION})
63-
message("COMPILER: " ${CMAKE_CXX_COMPILER})
59+
project(quantify LANGUAGES CXX C)
6460

6561
SET(QUANTIFY_DIR ${CMAKE_CURRENT_SOURCE_DIR})
6662
SET(QUANTIFY_TEST_DIR ${QUANTIFY_DIR}/test)
@@ -70,30 +66,6 @@ SET(QUANTIFY_CMAKE_DIR ${QUANTIFY_DIR}/cmake)
7066
list(APPEND CMAKE_MODULE_PATH ${QUANTIFY_CMAKE_DIR}/Modules)
7167

7268

73-
include(cmake/compiler_flags.cmake)
74-
compiler_flags(
75-
"-stdlib=libc++"
76-
"-Wall"
77-
"-Wextra"
78-
"-pedantic"
79-
"-Werror"
80-
81-
# "-Wliteral-suffix"
82-
83-
"-Wno-unused-function"
84-
"-Wno-unused-parameter"
85-
"-Wno-unused-variable"
86-
"-Wno-unused-value"
87-
"-Wno-unused-but-set-variable"
88-
"-Wno-missing-field-initializers"
89-
"-Wno-error=unused"
90-
"-Wno-unused-local-typedefs"
91-
92-
"-Wno-unknown-pragmas"
93-
# "-freport-bug"
94-
)
95-
96-
9769
################################################################################
9870
#[[ CONFIGURE DEPENDENCIES ]]#
9971
################################################################################
@@ -127,6 +99,7 @@ FILE(GLOB_RECURSE SRC_MOD_LIST CONFIGURE_DEPENDS
12799

128100
target_include_directories(quantify PUBLIC ${QUANTIFY_INCLUDE_DIR})
129101
target_compile_features(quantify PUBLIC cxx_std_23)
102+
target_compile_options(quantify PUBLIC -stdlib=libc++ -pthread)
130103
target_sources(quantify
131104
PUBLIC ${SRC_LIST}
132105
PUBLIC
@@ -136,11 +109,7 @@ target_sources(quantify
136109
BASE_DIRS ${QUANTIFY_SOURCE_DIR} ${QUANTIFY_INCLUDE_DIR}
137110
FILES ${SRC_MOD_LIST}
138111
)
139-
target_link_libraries(quantify
140-
PUBLIC
141-
std
142-
packtl
143-
)
112+
target_link_libraries(quantify PUBLIC packtl)
144113

145114

146115
################################################################################

cmake/compiler_flags.cmake

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)