修正Release 和 Debug编译选项

根据传入的 -DCMAKE_BUILD_TYPE=Release 或者Debug, 或者不写(默认是Debug) 来决定生成何种编译文件。
This commit is contained in:
明月惊鹊 2021-09-29 17:06:11 +08:00 committed by GitHub
parent adc6f652bd
commit 2bb9003ac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ if(CCACHE_FOUND)
endif(CCACHE_FOUND) endif(CCACHE_FOUND)
#set(CMAKE_BUILD_TYPE "Release") #set(CMAKE_BUILD_TYPE "Release")
if (${CMAKE_BUILD_TYPE} MATCHES "") if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "Debug") set(CMAKE_BUILD_TYPE "Debug")
endif () endif ()