ref: 404d748da78711906d910af488ea09edc44a5399
parent: e6b8221fdb6078c9ea3d316619bbec03e0df08cd
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Oct 29 07:53:02 EDT 2019
Rename ALL_WARNINGS and FATAL_WARNINGS This way, all three options appear neatly together when 'cmake -LH' is ran.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,8 +17,8 @@
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 @@
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 @@
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 @@
-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
)
--- a/DoConfig/CMakeLists.txt
+++ b/DoConfig/CMakeLists.txt
@@ -61,7 +61,7 @@
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 @@
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)
--- a/README.md
+++ b/README.md
@@ -67,8 +67,8 @@
`-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 @@
`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.
--- a/bin2h/CMakeLists.txt
+++ b/bin2h/CMakeLists.txt
@@ -61,7 +61,7 @@
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 @@
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)
--
⑨