From e9aef16da721decfdfa32aba5a04cd8f6137d76f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 14 Aug 2025 09:51:46 +0200 Subject: [PATCH] Add support for specifiying a language standard * docs/templates/bmake.txt: * templates/bmake.mpd: --- docs/templates/bmake.txt | 1 + templates/bmake.mpd | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/templates/bmake.txt b/docs/templates/bmake.txt index d5aa1fb6..15e7fb1e 100644 --- a/docs/templates/bmake.txt +++ b/docs/templates/bmake.txt @@ -19,6 +19,7 @@ debug_prj = Indicates that the current template configuration is debug. This is defines = Macros that are specific to a particular configuration. dllflags = Linker flags that are required to create a dynamic library. exeflags = Linker flags that are required to create an executable. +languagestandard = Which version of ISO C++ standard to compile against (c++14, c++17, c++20, c++23) libflags = Flags that are required to create a static library. link = The name of the tool used to create dynamic libraries and executables. obj_ext = The extension given to object files. diff --git a/templates/bmake.mpd b/templates/bmake.mpd index 5b27cc0b..518fc3aa 100644 --- a/templates/bmake.mpd +++ b/templates/bmake.mpd @@ -96,7 +96,8 @@ DLL_EXT = <%dll_ext%> EXE_EXT = <%exe_ext%> RC = <%rc%> LIBFLAGS = <%libflags%> -CCFLAGS = $(CC_CFLAGS)<%if(type_is_binary)%> $(BINARY_FLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%> +CCFLAGS = $(CC_CFLAGS)<%if(type_is_binary)%> $(BINARY_FLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%><%if(languagestandard)%> -std=<%languagestandard%><%endif%> + <%if(use_vcl)%> STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>