From 37756ede09402931758efc51072147a3ea73d961 Mon Sep 17 00:00:00 2001 From: Ville Voutilainen Date: Tue, 10 Sep 2019 15:18:46 +0300 Subject: 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 --- configure | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'configure') 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 -- cgit v1.2.3