[CMake] Regarding enviroment variables directly used in executables
Hi David, In our cmake project, we have the following scenario: 1. add_custom_command() call is as follows: add_custom_command(TARGET ${TESTTARGETNAME} POST_BUILD
Re: [CMake] Regarding enviroment variables directly used in executables
A SET(ENV{TARGET2_EXE_PATH} C:/Test/Target2) call in a CMakeLists file only has an effect while CMake is running. If you need the env var set for your batch file to run, you should pass the value for it down in as an arg to the batch file, and then do: set TARGET2_EXE_PATH=%~1 (no quotes