Skip to content

Commit 3da5577

Browse files
committed
Add more used compiler features for Cmake
Not very important, but lets Cmake ensure these features are available at compilation.
1 parent 1e6c0f9 commit 3da5577

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

CMakeLists.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,22 @@ find_package(ZLIB QUIET)
1919
include(GNUInstallDirs)
2020

2121
add_library(${PROJECT_NAME} INTERFACE)
22-
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_11)
22+
23+
# Might be missing some, but this list is somewhat comprehensive
24+
target_compile_features(${PROJECT_NAME} INTERFACE
25+
cxx_std_11
26+
cxx_nullptr
27+
cxx_noexcept
28+
cxx_lambdas
29+
cxx_override
30+
cxx_defaulted_functions
31+
cxx_attribute_deprecated
32+
cxx_auto_type
33+
cxx_decltype
34+
cxx_deleted_functions
35+
cxx_range_for
36+
cxx_sizeof_member
37+
)
2338

2439
target_include_directories(${PROJECT_NAME} INTERFACE
2540
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

0 commit comments

Comments
 (0)