Skip to content

Commit d9775a4

Browse files
committed
Cleanup cmake script and remove unnecessary compiler flags
Signed-off-by: Ian <[email protected]>
1 parent 8dbc697 commit d9775a4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ if (MSVC)
4444
/W4
4545
/permissive-
4646
/Zc:__cplusplus
47-
/D_ENABLE_EXTENDED_ALIGNED_STORAGE
4847
/EHsc
4948
)
5049
# Only define NOMINMAX on Windows platforms
@@ -67,18 +66,21 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
6766
-Wextra
6867
-Wconversion
6968
-Wpedantic
70-
-Wpedantic-macros
7169
# Define NOMINMAX only on Windows to avoid conflicts with min/max macros
7270
$<$<BOOL:${WIN32}>:-DNOMINMAX>
73-
#-Wno-unused-but-set-variable
74-
#-Wno-unused-value
75-
#-Wno-unused-parameter
7671
)
7772

73+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # TODO: Check if intel llvm has this flag
74+
target_compile_options(${PROJECT_NAME}-compile-options INTERFACE
75+
-Wpedantic-macros
76+
)
77+
endif ()
78+
7879
if (CCMATH_STRICT_WARNINGS)
7980
target_compile_options(${PROJECT_NAME}-compile-options INTERFACE -Werror=return-type)
8081
endif ()
8182

83+
# TODO: Decide if we plan to delete this or not
8284
# if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
8385
# target_compile_options(${PROJECT_NAME}-compile-options INTERFACE
8486
# -Wno-tautological-constant-compare
@@ -130,7 +132,7 @@ if (CCMATH_DISABLE_ERRNO)
130132
endif ()
131133

132134
# Generate version header
133-
configure_file(cmake/version.hpp.in "${CMAKE_CURRENT_BINARY_DIR}/include/${PROJECT_NAME}/version.hpp" @ONLY)
135+
configure_file(cmake/version.hpp.in "${CMAKE_CURRENT_BINARY_DIR}/include/ccmath/version.hpp" @ONLY)
134136

135137
# Add optional subdirectories only if requested
136138
if (CCMATH_BUILD_EXAMPLES OR CCMATH_BUILD_BENCHMARKS OR CCMATH_BUILD_TESTS)

0 commit comments

Comments
 (0)