Add C23 and CXX23 Compile flag since this works now
This commit is contained in:
parent
22120bafbc
commit
7f3a867575
3 changed files with 17 additions and 5 deletions
|
|
@ -18,9 +18,20 @@ if(("${CMAKE_COMPILER_IS_GNUCC}" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND
|
|||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY C_STANDARD 11)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY CXX_STANDARD 17)
|
||||
set(SRB2_CONFIG_STD23 OFF CACHE BOOL
|
||||
"Compiles the game under c23 and cxx23 instead c11 and cxx17.")
|
||||
|
||||
if(SRB2_CONFIG_STD23)
|
||||
message("-- Compiling game with C23 and CXX23.")
|
||||
target_compile_features(SRB2SDL2 PRIVATE c_std_23 cxx_std_23)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY C_STANDARD 23)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY CXX_STANDARD 23)
|
||||
else()
|
||||
message("-- Compiling game with C11 and CXX17.")
|
||||
target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY C_STANDARD 11)
|
||||
set_property(TARGET SRB2SDL2 PROPERTY CXX_STANDARD 17)
|
||||
endif()
|
||||
|
||||
# Core sources
|
||||
target_sourcefile(c)
|
||||
|
|
|
|||
|
|
@ -115,7 +115,8 @@ typedef int32_t boolean;
|
|||
|
||||
#ifndef __cplusplus
|
||||
#ifndef _WIN32
|
||||
enum {false = 0, true = 1};
|
||||
#define false 0
|
||||
#define true 1
|
||||
#else
|
||||
#define false FALSE
|
||||
#define true TRUE
|
||||
|
|
|
|||
|
|
@ -1192,7 +1192,7 @@ static void R_Subsector(size_t num)
|
|||
polyobj_t *po = sub->polyList;
|
||||
sector_t *polysec;
|
||||
|
||||
auto poly_damage = [&](auto& f) { return polysec->flags & POF_SOLID ? f(polysec) : sector_damage(polysec); };
|
||||
auto poly_damage = [&](auto& f) { return polysec->flags & (sectorflags_t)POF_SOLID ? f(polysec) : sector_damage(polysec); };
|
||||
auto poly_top_damage = [&] { return poly_damage(floor_damage); };
|
||||
auto poly_bottom_damage = [&] { return poly_damage(ceiling_damage); };
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue