So I use qmake to create my program, but I\'m always having a conflict between my debug and release boost libraries with the message:
libboost_syste
The answer is I think in Qt project org faq 355
If you always accept the name Qt Creator suggests for your build you can use the following simple solution in your pro files that in my case (Qt 5.5) works for Linux, Mac and Windows:
# to distinguish between debug and release executable as target
# we define the variables releaseExec and debugExec
# this only works if the $$OUT_PWD has "Release" in its name
BDIR = $$OUT_PWD
BDIR_STRIPPED = $$replace(BDIR,Release,)
equals (BDIR,$$BDIR_STRIPPED): CONFIG+= debugExec
else: CONFIG+= releaseExec
We used the variables releaseExec
and debugExec
to avoid name collisions with Qt CONFIG variables.
You can now use the switch statements:
releaseExec: warning ("this is a release build")
debugExec: warning ("this is a debug build")