Skip to content

Commit

Permalink
[CMake] Set default build type correctly
Browse files Browse the repository at this point in the history
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285789 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
smeenai committed Nov 2, 2016
1 parent 7cfe622 commit 701a1ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 701a1ef

Please sign in to comment.