Qt Creator: Ordering of debug/release builds?
-
In my project, if I select multiple configurations for a given kit, is there a way to enforce the order in which they will be built?
I noticed that in the project properties, that the build configuration can be renamed, or if selecting a new configuration one is prompted to give it a name.
Is this the way? Does Qt Creator build the project for multiple configurations in alphabeical order of the configuration name?
I would like to have "release" always built before "debug", if possible.
-
In my project, if I select multiple configurations for a given kit, is there a way to enforce the order in which they will be built?
I noticed that in the project properties, that the build configuration can be renamed, or if selecting a new configuration one is prompted to give it a name.
Is this the way? Does Qt Creator build the project for multiple configurations in alphabeical order of the configuration name?
I would like to have "release" always built before "debug", if possible.
@Robert-Hairgrove said in Qt Creator: Ordering of debug/release builds?:
Does Qt Creator build the project for multiple configurations in alphabetical order of the configuration name?
After some testing, the answer is "apparently not".
Other ideas?
-
@Robert-Hairgrove said in Qt Creator: Ordering of debug/release builds?:
Does Qt Creator build the project for multiple configurations in alphabetical order of the configuration name?
After some testing, the answer is "apparently not".
Other ideas?
@Robert-Hairgrove I just tested it, and renaming
DebugtoZDebugdidn't help.But removing it and adding a new Debug version named
ZDebugworked.12:21:30: Running steps for project untitled05... 12:21:30: Starting: "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake" --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-Release --target all ninja: no work to do. 12:21:30: The command "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-Release --target all" finished successfully. 12:21:30: Starting: "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake" --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-ZDebug --target all ninja: no work to do. 12:21:30: The command "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-ZDebug --target all" finished successfully. 12:21:30: Elapsed time: 00:00. -
Another option is to build the project itself as I present in https://cristianadam.eu/20191012/building-multiple-configurations-with-cmake-in-one-go/
You can then programmatically decide which version comes first.
-
@Robert-Hairgrove I just tested it, and renaming
DebugtoZDebugdidn't help.But removing it and adding a new Debug version named
ZDebugworked.12:21:30: Running steps for project untitled05... 12:21:30: Starting: "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake" --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-Release --target all ninja: no work to do. 12:21:30: The command "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-Release --target all" finished successfully. 12:21:30: Starting: "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake" --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-ZDebug --target all ninja: no work to do. 12:21:30: The command "/opt/homebrew/Cellar/cmake/4.2.1/bin/cmake --build /Users/cristian/Projects/C++/untitled05/build/Qt_6_10_0_for_macOS-ZDebug --target all" finished successfully. 12:21:30: Elapsed time: 00:00.@cristian-adam Thank you!
-
R Robert Hairgrove has marked this topic as solved
-
@cristian-adam regarding your blog post about many project configs in CMake, am I understanding correctly that the key insight (or the key cmake feature that unlocks the possibility) is to use
ExternalProject?I just want to confirm my understanding in case I attempt to leverage your advice in the future. It looks quite useful.
(hopefully I am not "hijacking" this thread. pretty sure I am staying close enough to the topic at hand)
-
@cristian-adam regarding your blog post about many project configs in CMake, am I understanding correctly that the key insight (or the key cmake feature that unlocks the possibility) is to use
ExternalProject?I just want to confirm my understanding in case I attempt to leverage your advice in the future. It looks quite useful.
(hopefully I am not "hijacking" this thread. pretty sure I am staying close enough to the topic at hand)
@KH-219Design said in Qt Creator: Ordering of debug/release builds?:
@cristian-adam am I understanding correctly that the key insight (or the key cmake feature that unlocks the possibility) is to use
ExternalProject?Only if you need the Visual Studio CMake generator. If you are using Ninja, then
add_subdirectoryis enough.