Skip to content

Commit d9c9e18

Browse files
committed
Enforce C++20 standard for plugin build
Added target_compile_features to require C++20 for the plugin. This ensures the code is compiled with C++20 features and compatibility.
1 parent 0335ed6 commit d9c9e18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/serious_python_windows/windows/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ add_library(${PLUGIN_NAME} SHARED
4242
# application-level CMakeLists.txt. This can be removed for plugins that want
4343
# full control over build settings.
4444
apply_standard_settings(${PLUGIN_NAME})
45+
target_compile_features(${PLUGIN_NAME} PRIVATE cxx_std_20)
4546

4647
# Symbols are hidden by default to reduce the chance of accidental conflicts
4748
# between plugins. This should not be removed; any symbols that should be
@@ -105,4 +106,4 @@ if(DEFINED ENV{SERIOUS_PYTHON_SITE_PACKAGES})
105106
"$ENV{SERIOUS_PYTHON_SITE_PACKAGES}"
106107
"${CMAKE_BINARY_DIR}/runner/$<$<CONFIG:Release>:Release>$<$<CONFIG:Debug>:Debug>/site-packages"
107108
)
108-
endif()
109+
endif()

0 commit comments

Comments
 (0)