diff options
author | Peter Dimov <pdimov@gmail.com> | 2021-05-30 21:06:05 +0300 |
---|---|---|
committer | Peter Dimov <pdimov@gmail.com> | 2021-05-30 22:43:47 +0300 |
commit | 243db4980c4390682d972434015e40a18d8e6dd7 (patch) | |
tree | 52db4b38feac1f0bc50c383ed1d4af9c7c2010d6 /CMakeLists.txt | |
parent | ea85975cb7f87d47500593ba11f9a5075cc08f17 (diff) | |
download | boost-243db4980c4390682d972434015e40a18d8e6dd7.tar.gz |
Set default CMAKE_BUILD_TYPE to Release
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 668ea82844..46e6771455 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,15 @@ -# Copyright 2019 Peter Dimov +# Copyright 2019, 2021 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt cmake_minimum_required(VERSION 3.5...3.16) +# The default build type must be set before project() +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + project(Boost VERSION 1.77.0 LANGUAGES CXX) set(BOOST_SUPERPROJECT_VERSION ${PROJECT_VERSION}) |