[llvm] r285789 - [CMake] Set default build type correctly
Shoaib Meenai via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 1 23:10:04 PDT 2016
Author: smeenai
Date: Wed Nov 2 01:10:03 2016
New Revision: 285789
URL: http://llvm.org/viewvc/llvm-project?rev=285789&view=rev
Log:
[CMake] Set default build type correctly
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.
Differential Revision: https://reviews.llvm.org/D26200
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=285789&r1=285788&r2=285789&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Wed Nov 2 01:10:03 2016
@@ -51,7 +51,7 @@ project(LLVM
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.
More information about the llvm-commits
mailing list