Skip to content

Commit a182d3c

Browse files
committed
NUKE CMake dependent options
cmake_dependent_option, as implemented in the GUI/TUI, is a pointless misfeature. It could be useful if it, say, showed the option as grayed out and then enabled itself as soon as the dependee changed. But what it actually does is hide the dependent option completely, and not show it until you reconfigure. So it's just a nuisance when you want to use the option: you have to configure multiple times. The goal of hiding options that are not relevant is hopeless anyway since there are always zillions of options that don't affect the current build. We had just 2 cmake_depend_option's, USE_SMP and USE_SLIM_LTO. Fixes Unvanquished/Unvanquished#1921.
1 parent bc09529 commit a182d3c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,16 @@ if(NOT DAEMON_EXTERNAL_APP)
117117
option(USE_MUMBLE "Build Daemon with mumblelink sumpport" ON)
118118
endif()
119119

120-
cmake_dependent_option(USE_SMP "Compile with support for running the renderer in a separate thread" 1 BUILD_CLIENT 0)
120+
option(USE_SMP "Compile with support for running the renderer in a separate thread" ON)
121121
option(USE_BREAKPAD "Generate Daemon crash dumps (which require Breakpad tools to read)" OFF)
122122
endif()
123123

124124
option(BUILD_TESTS "Build unit test applications" OFF)
125125

126126
option(USE_LTO "Use link-time optimization for release builds" OFF)
127-
cmake_dependent_option(USE_SLIM_LTO "Generate slim LTO objects, improves build times" 1 "USE_LTO AND \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL GNU" 0)
127+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL GNU)
128+
option(USE_SLIM_LTO "Generate slim LTO objects, improves build times" OFF)
129+
endif()
128130
option(USE_HARDENING "Use stack protection and other hardening flags" OFF)
129131
option(USE_WERROR "Tell the compiler to make the build fail when warnings are present" OFF)
130132
option(USE_PEDANTIC "Tell the compiler to be pedantic" OFF)

0 commit comments

Comments
 (0)