From 404d748da78711906d910af488ea09edc44a5399 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 29 Oct 2019 11:53:02 +0000 Subject: [PATCH] Rename ALL_WARNINGS and FATAL_WARNINGS This way, all three options appear neatly together when 'cmake -LH' is ran. --- CMakeLists.txt | 12 ++++++------ DoConfig/CMakeLists.txt | 4 ++-- README.md | 8 ++++---- bin2h/CMakeLists.txt | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 650e8c12..d218be34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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= -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 ) diff --git a/DoConfig/CMakeLists.txt b/DoConfig/CMakeLists.txt index 5492c843..e44264ed 100644 --- a/DoConfig/CMakeLists.txt +++ b/DoConfig/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index 9873cc86..235d4ba9 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/bin2h/CMakeLists.txt b/bin2h/CMakeLists.txt index f9424e2c..5f306b6e 100644 --- a/bin2h/CMakeLists.txt +++ b/bin2h/CMakeLists.txt @@ -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)