mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- Compile with -std=c++14 or -std=c++11 on GCC/Clang.
- Fixed initialization crossing goto.
This commit is contained in:
parent
8d58d63b60
commit
6baa1b0674
2 changed files with 27 additions and 2 deletions
|
@ -468,6 +468,30 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
|||
set( CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers ${CMAKE_C_FLAGS}" )
|
||||
set( CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers ${CMAKE_CXX_FLAGS}" )
|
||||
|
||||
# Use the highest C++ standard available since VS2015 compiles with C++14
|
||||
# but we only require C++11. The recommended way to do this in CMake is to
|
||||
# probably to use target_compile_features, but I don't feel like maintaining
|
||||
# a list of features we use.
|
||||
CHECK_CXX_COMPILER_FLAG( "-std=c++14" CAN_DO_CPP14 )
|
||||
if ( CAN_DO_CPP14 )
|
||||
set ( CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}" )
|
||||
else ()
|
||||
CHECK_CXX_COMPILER_FLAG( "-std=c++1y" CAN_DO_CPP1Y )
|
||||
if ( CAN_DO_CPP1Y )
|
||||
set ( CMAKE_CXX_FLAGS "-std=c++1y ${CMAKE_CXX_FLAGS}" )
|
||||
else ()
|
||||
CHECK_CXX_COMPILER_FLAG( "-std=c++11" CAN_DO_CPP11 )
|
||||
if ( CAN_DO_CPP11 )
|
||||
set ( CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}" )
|
||||
else ()
|
||||
CHECK_CXX_COMPILER_FLAG( "-std=c++0x" CAN_DO_CPP0X )
|
||||
if ( CAN_DO_CPP0X )
|
||||
set ( CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}" )
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Remove extra warnings when using the official DirectX headers.
|
||||
# Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid,
|
||||
# which is a royal pain. The previous version I had been using was fine with them.
|
||||
|
|
|
@ -2137,7 +2137,8 @@ bool P_TryMove(AActor *thing, fixed_t x, fixed_t y,
|
|||
|
||||
|
||||
// Check for crossed portals
|
||||
bool portalcrossed = false;
|
||||
bool portalcrossed;
|
||||
portalcrossed = false;
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue