diff options
author | Julien Schueller <schueller@phimeca.com> | 2019-05-27 11:42:06 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-06 14:48:39 +0200 |
commit | a90adae275cef10dd75b8fc19bc97a7cb59c43dc (patch) | |
tree | eb0d36e99edfdf3542ade9560e23f0547d9d8c59 /CMakeLists.txt | |
parent | 419dfd45cf32403537547e7555c857ccf7c30ce1 (diff) |
CMake: Change the default behavior CMAKE_BUILD_TYPE
Instead of setting CMAKE_BUILD_TYPE as a regular variable,
set it as a cache value, but only as a default. If the user
specifies -DCMAKE_BUILD_TYPE=Foo on the command line, that will
take priority.
PySide2 will inherit the build type from the shiboken build, also
unless explicitly specified on the command line.
Fix missing quotes around the build type in shiboken_helpers.cmake.
Task-number: PYSIDE-980
Change-Id: I2f7e5f71b66467ca5b30056c42d26d9a54ff265b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f9a6edf2..595489dfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,10 @@ -project(pyside2_super_project) - cmake_minimum_required(VERSION 3.1) cmake_policy(VERSION 3.1) +set(CMAKE_BUILD_TYPE Release CACHE STRING "Build Type") + +project(pyside2_super_project) + if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) message(FATAL_ERROR "In-source builds are not allowed.") endif() |