Skip to content

Commit d54da37

Browse files
committedNov 2, 2016
[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 llvm-svn: 285789
1 parent 5fd26e1 commit d54da37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎llvm/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ project(LLVM
5151

5252
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
5353
message(STATUS "No build type selected, default to Debug")
54-
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)")
54+
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)" FORCE)
5555
endif()
5656

5757
# This should only apply if you are both on an Apple host, and targeting Apple.

0 commit comments

Comments
 (0)
Please sign in to comment.