[llvm] r230041 - Setting up CMake to default to Debug when no build type is specified.
Chris Bieneman
beanz at apple.com
Fri Feb 20 11:02:59 PST 2015
Author: cbieneman
Date: Fri Feb 20 13:02:59 2015
New Revision: 230041
URL: http://llvm.org/viewvc/llvm-project?rev=230041&view=rev
Log:
Setting up CMake to default to Debug when no build type is specified.
Summary: Turns out if you don't set CMAKE_BUILD_TYPE the default is an empty string. This results in some of the behaviors of debug builds, but not all of them. For example ENABLE_ASSERTIONS is false.
Reviewers: rnk
Reviewed By: rnk
Subscribers: chapuni, llvm-commits
Differential Revision: http://reviews.llvm.org/D7360
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=230041&r1=230040&r2=230041&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Fri Feb 20 13:02:59 2015
@@ -2,6 +2,11 @@
cmake_minimum_required(VERSION 2.8.8)
+if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ message(STATUS "No build type selected, default to Debug")
+ set(CMAKE_BUILD_TYPE "Debug")
+endif()
+
# FIXME: It may be removed when we use 2.8.12.
if(CMAKE_VERSION VERSION_LESS 2.8.12)
# Invalidate a couple of keywords.
More information about the llvm-commits
mailing list