Skip to content

Commit 6897d26

Browse files
luapmartinkryksyh
authored andcommitted
guard build_dep against a non-build-type CONFIG
1 parent 7187076 commit 6897d26

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

buildtools/build_dependency.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ function(build_dep)
245245
set(BD_CONFIG "RelWithDebInfo")
246246
endif()
247247

248+
if(NOT BD_CONFIG MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
249+
message(FATAL_ERROR "[${BD_NAME}] invalid CONFIG '${BD_CONFIG}' (expected a CMake build type)")
250+
endif()
251+
248252
# Clear existing DEP_* variables so recipes do not leak into each other
249253
get_cmake_property(_allvars VARIABLES)
250254
foreach(_v ${_allvars})

0 commit comments

Comments
 (0)