Commit Graph

8 Commits

Author SHA1 Message Date
Joerg Bornemann
23216a6193 CMake: Support the -qtnamespace configure argument
Task-number: QTBUG-85373
Change-Id: I3f995b31339a3c2b0c97ca806c652bc67846fc69
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-08 07:09:05 +02:00
Joerg Bornemann
63e90281b2 CMake: Support mkspec-related configure arguments
Task-number: QTBUG-85373
Change-Id: I44ae15b4c05f23442ac6b9d69d31f22f01d0a48c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-08 07:09:00 +02:00
Joerg Bornemann
fe5fa1d974 CMake: Support -static, -shared and -framework configure arguments
Task-number: QTBUG-85373
Change-Id: I0a1db7dcb4cb1738fa1ba0a687d41c5f5a613364
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-08 07:08:56 +02:00
Joerg Bornemann
26fbf8082c CMake: Support configure -force_debug_info
Task-number: QTBUG-85373
Change-Id: Ia798fc2cf715aed9157e1d9e2f64187c16e38bcf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-06 17:44:01 +02:00
Joerg Bornemann
dd77597252 CMake: Support build config-related configure options
This add support for the following options: -debug, -release,
-debug-and-release. For the latter, the "Ninja Multi-Config" generator
is auto-detected, if ninja is available.

Task-number: QTBUG-85373
Change-Id: Ide0ca44e5f4c74657147e89d71e8d71c4f6a4c45
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-06 17:43:52 +02:00
Joerg Bornemann
ab559e25af CMake: Support -bindir, -libdir, -*dir configure arguments
Task-number: QTBUG-85373
Change-Id: I0df181cb017561c3f0af5ab3fecb76008b89c0d2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-06 17:43:42 +02:00
Joerg Bornemann
3ac054d6a8 CMake: Re-work configure flags for CMake generators
Remove the -cmake-makefiles configure argument as its meaning was in
essence "do not pass a -G argument to CMake".
Instead, we add the following arguments:
    -cmake-generator <name> to pass -G <name> to CMake
    -cmake-use-default-generator to pass no -G argument to CMake

If none of those arguments is given, we try to autodetect the
generator. If a ninja executable is found, we prefer the Ninja
generator. On Unix we fall back to "Unix Makefiles".
On Windows, we do a poor man's compiler detection and select one of
"NMake Makefiles", "NMake Makefiles JOM" and "MinGW Makefiles".

Change-Id: Ic36669bd50956d15fbc71cee73720732cd4bfab8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-06 17:43:35 +02:00
Joerg Bornemann
dbd3c75965 CMake: Teach configure.bat the -cmake argument
The configure scripts need to translate configure options to CMake
arguments. It is not sensible to implement this translation twice, in
sh and Windows batch language, so we're doing this once, in CMake
language.

The configure scripts write their options into config.opt and call a
CMake script that reads config.opt, does the translation to CMake
arguments and calls CMake to generate the build system.

While we're at it, implement some more translations than the sh
configure provided, like -extprefix, -top-level and -skip.

Fixes: QTBUG-85349
Fixes: QTBUG-85350
Task-number: QTBUG-85373
Change-Id: Ida5d8b2a3c178b9349d41ec76d190c69a9456e74
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-07-06 17:43:28 +02:00