소스 검색

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")