diff options
author | Chris Bieneman <beanz@apple.com> | 2016-08-18 18:17:28 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-08-18 18:17:28 +0000 |
commit | 21eafc73635c92ff5d81bc0828cbd4fb1c9538cc (patch) | |
tree | fef2986da0bdef5a673b36eb19372178ac58a87d /CMakeLists.txt | |
parent | 3f7f855997ba309d17a7bd7de62c6d92d0513123 (diff) |
[CMake] Silence message on multi-configuration generators
The Xcode and Visual Studio generators always log "-- No build type selected, default to Debug". This is because CMake doesn't initialize "CMAKE_CONFIGURATION_TYPES" until the generator's EnableLanguage call gets hit.
The first place EnableLanguage gets hit in our configuration is in the project() call. Since CMAKE_BUILD_TYPE isn't used until after we call project() it is safe to just move this check down a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c773a707762..894bc8c1c94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,11 +2,6 @@ cmake_minimum_required(VERSION 3.4.3) -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)") -endif() - if(POLICY CMP0022) cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required endif() @@ -50,6 +45,11 @@ project(LLVM ${cmake_3_0_LANGUAGES} C CXX ASM) +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)") +endif() + # This should only apply if you are both on an Apple host, and targeting Apple. if(CMAKE_HOST_APPLE AND APPLE) if(NOT CMAKE_XCRUN) |