Skip to content

Commit 5509d64

Browse files
Goober5000claude
andcommitted
remove rpavlik-cmake-modules submodule and dead cotire references
Only EnableExtraCompilerWarnings.cmake was ever used from the ~150-file rpavlik submodule; vendor it into cmake/ and drop the submodule. Also remove the dead cotire module-path entry and the vestigial ENABLE_COTIRE option (cotire is never invoked and its directory no longer exists). Repoint the submodule-initialized check at libRocket. Follow-up to #7646. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3e317d9 commit 5509d64

4 files changed

Lines changed: 89 additions & 10 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "cmake/external/rpavlik-cmake-modules"]
2-
path = cmake/external/rpavlik-cmake-modules
3-
url = https://github.com/rpavlik/cmake-modules.git
41
[submodule "lib/libRocket"]
52
path = lib/libRocket
63
url = https://github.com/scp-fs2open/libRocket.git

CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,12 @@ endif()
4848
PROJECT(FS2_Open LANGUAGES ${FSO_LANGUAGES})
4949

5050
# Check if the external modules exists
51-
IF(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/external/rpavlik-cmake-modules/launcher-templates")
51+
IF(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib/libRocket/Build")
5252
message(FATAL_ERROR "External submodules could not be found. Please make sure you have updated your submodules.")
5353
endif()
5454

5555
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
5656
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/finder")
57-
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/external/rpavlik-cmake-modules")
58-
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/external/cotire")
5957

6058
# this must be set before include(toolchain)
6159
if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
@@ -122,8 +120,6 @@ SET(FSO_RUN_ARGUMENTS "" CACHE STRING "Additional arguments passed to a generate
122120

123121
option(FSO_INSTALL_DEBUG_FILES "Install some debug files (currently only PDB files on windows)" OFF)
124122

125-
option(ENABLE_COTIRE "Enable cotire for faster compilation. Enabled by default." ON)
126-
127123
option(FSO_RELEASE_LOGGING "Enable logging output for release builds" OFF)
128124

129125
OPTION(FSO_BUILD_WITH_FFMPEG "Enable the usage of FFmpeg for sound and custscenes" ON)
@@ -172,7 +168,6 @@ MARK_AS_ADVANCED(FORCE FSO_USE_LUAJIT)
172168
MARK_AS_ADVANCED(FORCE FSO_DEVELOPMENT_MODE)
173169
MARK_AS_ADVANCED(FORCE FSO_FATAL_WARNINGS)
174170
mark_as_advanced(FORCE FSO_INSTALL_DEBUG_FILES)
175-
mark_as_advanced(FORCE ENABLE_COTIRE)
176171
mark_as_advanced(FORCE FSO_RELEASE_LOGGING)
177172
mark_as_advanced(FORCE FSO_BUILD_WITH_FFMPEG)
178173
mark_as_advanced(FORCE FSO_BUILD_WITH_DISCORD)
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# - Add flags to compile with extra warnings
2+
#
3+
# enable_extra_compiler_warnings(<targetname>)
4+
# globally_enable_extra_compiler_warnings() - to modify CMAKE_CXX_FLAGS, etc
5+
# to change for all targets declared after the command, instead of per-command
6+
#
7+
#
8+
# Original Author:
9+
# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
10+
# http://academic.cleardefinition.com
11+
# Iowa State University HCI Graduate Program/VRAC
12+
#
13+
# Copyright Iowa State University 2009-2010.
14+
# Distributed under the Boost Software License, Version 1.0.
15+
# (See accompanying file LICENSE_1_0.txt or copy at
16+
# http://www.boost.org/LICENSE_1_0.txt)
17+
18+
if(__enable_extra_compiler_warnings)
19+
return()
20+
endif()
21+
set(__enable_extra_compiler_warnings YES)
22+
23+
macro(_enable_extra_compiler_warnings_flags)
24+
set(_flags)
25+
if(MSVC)
26+
option(COMPILER_WARNINGS_EXTREME
27+
"Use compiler warnings that are probably overkill."
28+
off)
29+
mark_as_advanced(COMPILER_WARNINGS_EXTREME)
30+
set(_flags "/W4")
31+
if(COMPILER_WARNINGS_EXTREME)
32+
set(_flags "${_flags} /Wall /wd4619 /wd4668 /wd4820 /wd4571 /wd4710")
33+
endif()
34+
else()
35+
include(CheckCXXCompilerFlag)
36+
set(_flags)
37+
38+
check_cxx_compiler_flag(-W SUPPORTS_W_FLAG)
39+
if(SUPPORTS_W_FLAG)
40+
set(_flags "${_flags} -W")
41+
endif()
42+
43+
check_cxx_compiler_flag(-Wall SUPPORTS_WALL_FLAG)
44+
if(SUPPORTS_WALL_FLAG)
45+
set(_flags "${_flags} -Wall")
46+
endif()
47+
48+
check_cxx_compiler_flag(-Wextra SUPPORTS_WEXTRA_FLAG)
49+
if(SUPPORTS_WEXTRA_FLAG)
50+
set(_flags "${_flags} -Wextra")
51+
endif()
52+
53+
if(SUPPORTS_WALL_FLAG)
54+
# At least GCC includes -Wmaybe-uninitialized in -Wall, which
55+
# unneccesarily whines about boost::optional (by it's nature
56+
# it's a "maybe" warning - prone to noisy false-positives)
57+
check_cxx_compiler_flag(-Wno-maybe-uninitialized SUPPORTS_WNO_MAYBE_UNINITIALIZED_FLAG)
58+
if(SUPPORTS_WNO_MAYBE_UNINITIALIZED_FLAG)
59+
set(_flags "${_flags} -Wno-maybe-uninitialized")
60+
endif()
61+
endif()
62+
endif()
63+
endmacro()
64+
65+
function(enable_extra_compiler_warnings _target)
66+
_enable_extra_compiler_warnings_flags()
67+
get_target_property(_origflags ${_target} COMPILE_FLAGS)
68+
if(_origflags)
69+
set_property(TARGET
70+
${_target}
71+
PROPERTY
72+
COMPILE_FLAGS
73+
"${_flags} ${_origflags}")
74+
else()
75+
set_property(TARGET
76+
${_target}
77+
PROPERTY
78+
COMPILE_FLAGS
79+
"${_flags}")
80+
endif()
81+
82+
endfunction()
83+
84+
function(globally_enable_extra_compiler_warnings)
85+
_enable_extra_compiler_warnings_flags()
86+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}" PARENT_SCOPE)
87+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flags}" PARENT_SCOPE)
88+
endfunction()
Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)