Rename ALL_WARNINGS and FATAL_WARNINGS

This way, all three options appear neatly together when 'cmake -LH'
is ran.
This commit is contained in:
Clownacy 2019-10-29 11:53:02 +00:00
parent e6b8221fdb
commit 404d748da7
4 changed files with 14 additions and 14 deletions

View file

@ -17,8 +17,8 @@ option(DEBUG_SAVE "Re-enable the ability to drag-and-drop save files onto the wi
set(RENDERER "SDLTexture" CACHE STRING "Which renderer the game should use: 'OpenGL3' for an OpenGL 3.2 renderer, 'SDLTexture' for SDL2's hardware-accelerated Texture API, 'SDLSurface' for SDL2's software-rendered Surface API, or 'Software' for a handwritten software renderer")
option(WARNINGS "Enable common compiler warnings (for gcc-compatible compilers and MSVC only)" OFF)
option(ALL_WARNINGS "Enable ALL compiler warnings (for clang and MSVC only)" OFF)
option(FATAL_WARNINGS "Stop compilation on any compiler warning (for gcc-compatible compilers and MSVC only)" OFF)
option(WARNINGS_ALL "Enable ALL compiler warnings (for clang and MSVC only)" OFF)
option(WARNINGS_FATAL "Stop compilation on any compiler warning (for gcc-compatible compilers and MSVC only)" OFF)
option(FORCE_LOCAL_LIBS "Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones" OFF)
project(CSE2 LANGUAGES C CXX)
@ -302,7 +302,7 @@ if (WARNINGS)
endif()
endif()
if (ALL_WARNINGS)
if (WARNINGS_ALL)
# HACK : Replace this with CMake provided stuff when possible (when CMake makes avoiding this possible (it isn't currently))
if (MSVC)
@ -323,7 +323,7 @@ if (ALL_WARNINGS)
endif()
endif()
if (FATAL_WARNINGS)
if (WARNINGS_FATAL)
# HACK : Replace this with CMake provided stuff when possible (when CMake makes avoiding this possible (it isn't currently))
if (MSVC)
@ -373,8 +373,8 @@ ExternalProject_Add(bin2h
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=Release
-DWARNINGS=${WARNINGS}
-DALL_WARNINGS=${ALL_WARNINGS}
-DFATAL_WARNINGS=${FATAL_WARNINGS}
-DWARNINGS_ALL=${WARNINGS_ALL}
-DWARNINGS_FATAL=${WARNINGS_FATAL}
INSTALL_COMMAND
${CMAKE_COMMAND} --build . --config Release --target install
)

View file

@ -61,7 +61,7 @@ if (WARNINGS)
endif()
endif()
if (ALL_WARNINGS)
if (WARNINGS_ALL)
# HACK : Replace this with CMake provided stuff when possible (when CMake makes avoiding this possible (it isn't currently))
if (MSVC)
@ -82,7 +82,7 @@ if (ALL_WARNINGS)
endif()
endif()
if (FATAL_WARNINGS)
if (WARNINGS_FATAL)
# HACK : Replace this with CMake provided stuff when possible (when CMake makes avoiding this possible (it isn't currently))
if (MSVC)

View file

@ -67,8 +67,8 @@ Name | Function
`-DRENDERER=SDLSurface` | Use the software-rendered SDL2 Surface API renderer
`-DRENDERER=Software` | Use the handwritten software renderer
`-DWARNINGS=ON` | Enable common compiler warnings (for gcc-compatible compilers and MSVC only)
`-DALL_WARNINGS=ON` | Enable ALL compiler warnings (for clang and MSVC only)
`-DFATAL_WARNINGS=ON` | Stop compilation on any compiler warning (for gcc-compatible compilers and MSVC only)
`-DWARNINGS_ALL=ON` | Enable ALL compiler warnings (for clang and MSVC only)
`-DWARNINGS_FATAL=ON` | Stop compilation on any compiler warning (for gcc-compatible compilers and MSVC only)
`-DFORCE_LOCAL_LIBS=ON` | Compile the built-in versions of SDL2, FreeType, and FLTK instead of using the system-provided ones
Then compile CSE2 with this command:
@ -100,8 +100,8 @@ Name | Function
`RENDERER=SDLSurface` | Use the software-rendered SDL2 Surface API renderer
`RENDERER=Software` | Use the hand-written software renderer
`WARNINGS=1` | Enable common warnings
`ALL_WARNINGS=1` | Enable ALL warnings (clang/MSVC only)
`FATAL_WARNINGS=1` | Make all warnings errors
`WARNINGS_ALL=1` | Enable ALL warnings (clang/MSVC only)
`WARNINGS_FATAL=1` | Make all warnings errors
Once built, the executables and assets can be found in the newly-generated `game` folder.

View file

@ -61,7 +61,7 @@ if (WARNINGS)
endif()
endif()
if (ALL_WARNINGS)
if (WARNINGS_ALL)
# HACK : Replace this with CMake provided stuff when possible (when CMake makes avoiding this possible (it isn't currently))
if (MSVC)
@ -82,7 +82,7 @@ if (ALL_WARNINGS)
endif()
endif()
if (FATAL_WARNINGS)
if (WARNINGS_FATAL)
# HACK : Replace this with CMake provided stuff when possible (when CMake makes avoiding this possible (it isn't currently))
if (MSVC)