define 'Shadow Build' directory in .pro file
-
Hi!
I would like to define the build directory, just like in
Shadow Build
, but in mycommon.pri
file.I read somewhere that defining
OUT_PWD
would do the trick, but it did not.Does anyone know how to do it?
TIA!
-
Hi,
It'd not something you define at the .pro file level. A shadow build is simply an out of source build.
-
Ok, I understand.
I need to place all the
Makefile
in a different directory, just like theShadow Build
does.Is there anyway to do it?
-
Ok, I understand.
I need to place all the
Makefile
in a different directory, just like theShadow Build
does.Is there anyway to do it?
@RodrigoCanellas said in define 'Shadow Build' directory in .pro file:
Is there anyway to do it?
Yes, out of source build, just like @SGaist already wrote.
mkdir build_folder cd build_folder qmake ../project_folder make
-
This post is deleted!
-
I meant in the
common.pri
file -
I meant in the
common.pri
file@RodrigoCanellas Why would you define build folder inside project file? Especially if more than one person is working on a project that can lead to problems.
-
The idea is that this configuration can be commited to a version control (like
git
), and every developer can get it, regardless the QtCreator configuration, which stays, AFIK, in a file that can not be in a versioned directory. If a developer does not turn onShadow Build
and/or setBuild Path
correctly, can lead to build erros. -
The idea is that this configuration can be commited to a version control (like
git
), and every developer can get it, regardless the QtCreator configuration, which stays, AFIK, in a file that can not be in a versioned directory. If a developer does not turn onShadow Build
and/or setBuild Path
correctly, can lead to build erros.@RodrigoCanellas I never saw a project storing path to build folder inside project configuration to be honest. A developer should be able to set build folder properly the way he/she wants it to be.
-
Ok, I accept defeat... and what about the variables used in
Build & Run
/Default build directory
, likeKit:FileSystemName
andBuildConfig:Name
? Would you know where can I get a list of these variables? I think I can get a result closer to the one I wanted, by using them.More precisely, I would like to define something like
build/<platform>-<architecture>-<configuration>
, producingbuild/win-x64-debug
.Thanks for your help!
-
Ok, I accept defeat... and what about the variables used in
Build & Run
/Default build directory
, likeKit:FileSystemName
andBuildConfig:Name
? Would you know where can I get a list of these variables? I think I can get a result closer to the one I wanted, by using them.More precisely, I would like to define something like
build/<platform>-<architecture>-<configuration>
, producingbuild/win-x64-debug
.Thanks for your help!
@RodrigoCanellas For qmake variables see: https://doc.qt.io/qt-5/qmake-variable-reference.html
For QtCreator check this: https://stackoverflow.com/questions/35970727/use-of-variables-like-builddir-in-qtcreator-kit-settings-in-qt5 -
Thanks a lot!
I think I'll be able to do what I want through
%
variables, but it seems theA->B
button does not show the entire list, and I could not find what possible values for<value>
in, for example,Compile:Name:<value>
.I saw now the
Debugger:Abi
, which in my case evaluates inx86-darwin-generic-mach_o-64bit arm-darwin-generic-mach_o-64bit
. I do not know why it reports the two CPU architectures supported by the compiler, even though the current Kit definesx86
.If there was a way to access the current ABI, may be through
%Kit
variable, and then to access each part of the ABI definition, that would do it.