From 8c2597bf1ef265e3006a2452d06abe16bc3611dd Mon Sep 17 00:00:00 2001 From: Michael Bachmann Date: Mon, 1 Sep 2025 15:34:01 +0200 Subject: [PATCH] explicitly specifying c17 in libember_slim compiler args with recent gcc/cmake versions that compile against c23 the build fails due to 'bool' now being a built in type Signed-off-by: Michael Bachmann --- libember_slim/cmake/modules/EnableWarnings.cmake | 2 +- premake4.lua | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libember_slim/cmake/modules/EnableWarnings.cmake b/libember_slim/cmake/modules/EnableWarnings.cmake index 864a2ef2..221e056f 100644 --- a/libember_slim/cmake/modules/EnableWarnings.cmake +++ b/libember_slim/cmake/modules/EnableWarnings.cmake @@ -3,7 +3,7 @@ if (NOT ENABLE_WARNINGS_INCLUDED) function(enable_warnings_on_target target) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU") - target_compile_options(${target} PRIVATE -Wall -Wextra -Wunreachable-code -Wpedantic -Wno-long-long) + target_compile_options(${target} PRIVATE -Wall -Wextra -Wunreachable-code -Wpedantic -Wno-long-long -std=c17) endif() if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) diff --git a/premake4.lua b/premake4.lua index 1128de35..4291807c 100644 --- a/premake4.lua +++ b/premake4.lua @@ -144,6 +144,9 @@ solution "EmberPlus SDK" configuration { "not windows" } targetname "ember_slim" + configuration { "gmake or not windows" } + buildoptions { "-std=c17" } + -- Common settings for all static library configurations of this project configuration { "*Static" } kind "StaticLib"