summaryrefslogtreecommitdiffstats
path: root/cmake/QtSetup.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtSetup.cmake')
-rw-r--r--cmake/QtSetup.cmake17
1 files changed, 16 insertions, 1 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake
index c9d2655bd9..4f0c98a6b9 100644
--- a/cmake/QtSetup.cmake
+++ b/cmake/QtSetup.cmake
@@ -59,6 +59,12 @@ elseif(CMAKE_CONFIGURATION_TYPES)
message(STATUS
"Default build configuration set to '${CMAKE_NINJA_MULTI_DEFAULT_BUILD_TYPE}'.")
endif()
+ if(CMAKE_GENERATOR STREQUAL "Ninja")
+ message(FATAL_ERROR
+ "It's not possible to build multiple configurations with the single config Ninja "
+ "generator. Consider configuring with -G\"Ninja Multi-Config\" instead of -GNinja."
+ )
+ endif()
else()
message(STATUS "CMAKE_BUILD_TYPE was set to: '${CMAKE_BUILD_TYPE}'")
endif()
@@ -110,6 +116,10 @@ endif()
## Position independent code:
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+# Does the linker support position independent code?
+include(CheckPIESupported)
+check_pie_supported()
+
# Do not relink dependent libraries when no header has changed:
set(CMAKE_LINK_DEPENDS_NO_SHARED ON)
@@ -252,7 +262,12 @@ option(QT_BUILD_EXAMPLES_AS_EXTERNAL "Should examples be built as ExternalProjec
unset(_qt_build_examples_as_external)
option(QT_BUILD_MANUAL_TESTS "Build Qt manual tests" OFF)
-option(QT_BUILD_MINIMAL_STATIC_TESTS "Build minimal subset of tests for static Qt builds" OFF)
+
+if(WASM)
+ option(QT_BUILD_MINIMAL_STATIC_TESTS "Build minimal subset of tests for static Qt builds" ON)
+else()
+ option(QT_BUILD_MINIMAL_STATIC_TESTS "Build minimal subset of tests for static Qt builds" OFF)
+endif()
## Path used to find host tools, either when cross-compiling or just when using the tools from
## a different host build.