How to use Environment Environment variables with External Tools ?
-
Hello,
I have defined an External tool in my QtCreator that requires a "ID number" as a parameter. For now that parameter is defined in the project's CMakeLists.txt. I already gave up on trying to get a CMake variable using External Tools (or it would require me to parse the CMake to get said variable). But I was wondering if it was possible to use a Environment Variable as a Parameter for that External Tool . Variable that I would have to define manually in the Projects-> Build-> Build Environment -> Add "CMAKE_APP_ID".
According to the documentation it should be possible use it by typing %{ENV:CMAKE_APP_ID} ... But sadly it doesn't work. I tried using echo as an External Tool with this parameter and it returns nothing.
Am I doing something wrong ?
Thanks for reading.
-
Hi @Aramir
If you want it to be based on your current build environment then you should use %{CurrentBuild:Env:CMAKE_APP_ID} instead of %{ENV:CMAKE_APP_ID} as the latter will just take your system environment as opposed to the build one.
Does this solve it?