ispc: fix CMAKE_BUILD_TYPE=None

This commit is contained in:
Đoàn Trần Công Danh 2021-03-21 15:43:09 +07:00
parent d943b372d8
commit 77f4f82cc0
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
Index: ispc-1.15.0/CMakeLists.txt
===================================================================
--- ispc-1.15.0.orig/CMakeLists.txt
+++ ispc-1.15.0/CMakeLists.txt
@@ -157,13 +157,6 @@ set(OUTPUT_RELEASE Release/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin )
if(CMAKE_BUILD_TYPE)
- # Validate build type
- set(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
-
- string(FIND "${CONFIGURATION_TYPES}" "${CMAKE_BUILD_TYPE}" MATCHED_CONFIG)
- if (${MATCHED_CONFIG} EQUAL -1)
- message(FATAL_ERROR "CMAKE_BUILD_TYPE (${CMAKE_BUILD_TYPE}) allows only the following values: ${CONFIGURATION_TYPES}")
- endif()
else(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
message(STATUS "Build type not specified: Use Release by default.")