Pārlūkot izejas kodu

HPCC-14932 CMake does not validate build type properly

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 gadi atpakaļ
vecāks
revīzija
14bd1eefe2
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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")