summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2019-09-10 15:18:46 +0300
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-11 08:30:50 +0000
commit37756ede09402931758efc51072147a3ea73d961 (patch)
tree6e9c865094193b54ffaf73d7613a26e4e3f826f6 /configure
parent2cf0ba1fba9293b3265a186527dbc90d395dfd20 (diff)
cmake: configure defaults to ninja, support -developer-mode
This makes -developer-mode build tests and examples, too. Change-Id: I3f1a700c6e9d06ab632990561e13f059acb4e6ff Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index f99499c53e..d82455f880 100755
--- a/configure
+++ b/configure
@@ -120,6 +120,21 @@ set -f # suppress globbing in for loop
SAVED_IFS=$IFS
IFS='
'
+
+if [ "$CFG_DEV" = "yes" ]; then
+ CMAKE_CMDLINE="$CMAKE_CMDLINE
+-DFEATURE_developer_build=ON"
+ CMAKE_CMDLINE="$CMAKE_CMDLINE
+-DBUILD_TESTING=ON"
+ CMAKE_CMDLINE="$CMAKE_CMDLINE
+-DBUILD_EXAMPLES=ON"
+fi
+
+if [ "$CMAKE_MAKEFILES" = "no" ]; then
+ CMAKE_CMDLINE="$CMAKE_CMDLINE
+-G Ninja"
+fi
+
for i in "$@"; do
if [ "$PASSTHRU" = "yes" ]; then
CMAKE_CMDLINE="$CMAKE_CMDLINE
@@ -432,6 +447,7 @@ OPT_HELP=
CFG_SILENT=no
CFG_DEV=no
BUILD_WITH_CMAKE=no
+CMAKE_MAKEFILES=no
#-------------------------------------------------------------------------------
# parse command line arguments
@@ -587,6 +603,10 @@ while [ "$#" -gt 0 ]; do
cmake)
BUILD_WITH_CMAKE=yes
;;
+ cmake-makefiles)
+ BUILD_WITH_CMAKE=yes
+ CMAKE_MAKEFILES=yes
+ ;;
*)
;;
esac