[PATCH] D26200: [CMake] Set default build type correctly
Shoaib Meenai via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 1 09:53:59 PDT 2016
smeenai created this revision.
smeenai added reviewers: beanz, compnerd, rafael.
smeenai added a subscriber: llvm-commits.
Herald added a subscriber: mgorny.
At least with cmake 3.6.1, the default build type setting was having no
effect; the generated CMakeCache.txt still had an empty CMAKE_BUILD_TYPE.
Force the variable to be set to achieve the desired behavior.
https://reviews.llvm.org/D26200
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -51,7 +51,7 @@
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Debug")
- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)")
+ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)" FORCE)
endif()
# This should only apply if you are both on an Apple host, and targeting Apple.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26200.76584.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161101/c4cab81b/attachment.bin>
More information about the llvm-commits
mailing list