浏览代码

HPCC-14932 CMake does not validate build type properly

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 年之前
父节点
当前提交
14bd1eefe2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cmake_modules/commonSetup.cmake

+ 1 - 1
cmake_modules/commonSetup.cmake

@@ -248,7 +248,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
 
   if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
     set ( CMAKE_BUILD_TYPE "Release" )
-  elseif (NOT "${CMAKE_BUILD_TYPE}" MATCHES "Debug|Release|RelWithDebInfo")
+  elseif (NOT "${CMAKE_BUILD_TYPE}" MATCHES "^Debug$|^Release$|^RelWithDebInfo$")
     message (FATAL_ERROR "Unknown build type ${CMAKE_BUILD_TYPE}")
   endif ()
   message ("-- Making ${CMAKE_BUILD_TYPE} system")