From df586e40a2a7fad7de222eb0cd1644f75b5682ed Mon Sep 17 00:00:00 2001 From: Tim Ebbeke Date: Sat, 19 Aug 2023 18:29:02 +0200 Subject: [PATCH] Relaxed C++ standard requirement. --- cmake/backend/emscripten.cmake | 2 -- nui/src/nui/backend/CMakeLists.txt | 4 ++-- nui/src/nui/frontend/CMakeLists.txt | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cmake/backend/emscripten.cmake b/cmake/backend/emscripten.cmake index 500ffe9..3b667bf 100644 --- a/cmake/backend/emscripten.cmake +++ b/cmake/backend/emscripten.cmake @@ -89,8 +89,6 @@ function(nui_add_emscripten_target) # emscripten cmake with passed down Release/Debug build type CONFIGURE_COMMAND ${EMCMAKE} cmake - -DCMAKE_CXX_STANDARD=23 - -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ${NUI_ADD_EMSCRIPTEN_TARGET_ARGS_CMAKE_OPTIONS} "${SOURCE_DIR}" # copy over package.json and fill parcel options that do not exist on it diff --git a/nui/src/nui/backend/CMakeLists.txt b/nui/src/nui/backend/CMakeLists.txt index 07eca3e..496ee4d 100644 --- a/nui/src/nui/backend/CMakeLists.txt +++ b/nui/src/nui/backend/CMakeLists.txt @@ -50,5 +50,5 @@ else() endif() nui_set_target_output_directories(nui-backend) target_compile_features(nui-backend PUBLIC cxx_std_20) -set_target_properties(nui-backend PROPERTIES CXX_STANDARD_REQUIRED ON) -set_target_properties(nui-backend PROPERTIES CXX_EXTENSIONS ON) +set_target_properties(nui-backend PROPERTIES CXX_STANDARD_REQUIRED OFF) +set_target_properties(nui-backend PROPERTIES CXX_EXTENSIONS OFF) diff --git a/nui/src/nui/frontend/CMakeLists.txt b/nui/src/nui/frontend/CMakeLists.txt index 28c7700..e081638 100644 --- a/nui/src/nui/frontend/CMakeLists.txt +++ b/nui/src/nui/frontend/CMakeLists.txt @@ -18,6 +18,6 @@ target_link_libraries( ) nui_set_project_warnings(nui-frontend) nui_set_target_output_directories(nui-frontend) -target_compile_features(nui-frontend PUBLIC cxx_std_23) -set_target_properties(nui-frontend PROPERTIES CXX_STANDARD_REQUIRED ON) -set_target_properties(nui-frontend PROPERTIES CXX_EXTENSIONS ON) +target_compile_features(nui-frontend PUBLIC cxx_std_20) +set_target_properties(nui-frontend PROPERTIES CXX_STANDARD_REQUIRED OFF) +set_target_properties(nui-frontend PROPERTIES CXX_EXTENSIONS OFF)