mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 12:11:20 -03:00
cmake: Warn on unknown build type
CMake has this entire zoo of weird build types including "MinSizeRel". I've also seen it set to empty, in distro packages no less. Since we can't really make them all known to cargo, let's warn. We could also error, but I'm not convinced there isn't some distro packager out there setting it to "StrawberriesAndKittens" for some reason, and they'd be very cross with us if that stopped working. See #11376
This commit is contained in:
@@ -36,6 +36,11 @@ get_filename_component(REAL_CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}" REALPATH)
|
||||
add_definitions(-DCMAKE_BINARY_DIR="${REAL_CMAKE_BINARY_DIR}")
|
||||
add_definitions(-DCMAKE_SOURCE_DIR="${REAL_CMAKE_SOURCE_DIR}")
|
||||
|
||||
set(build_types Release RelWithDebInfo Debug "")
|
||||
if(NOT "${CMAKE_BUILD_TYPE}" IN_LIST build_types)
|
||||
message(WARNING "Unsupported build type ${CMAKE_BUILD_TYPE}. If this doesn't build, try one of Release, RelWithDebInfo or Debug")
|
||||
endif()
|
||||
|
||||
# Define a function to build and link dependencies.
|
||||
function(CREATE_TARGET target)
|
||||
add_custom_target(
|
||||
|
||||
Reference in New Issue
Block a user