On 08/11/2015 12:49 AM, James Johnston wrote:
> CONFIGURE_ENVIRONMENT_COMMAND <path to VCVarsAll.bat>
[snip]
> add_custom_command(<snip> ENVIRONMENT_COMMAND <path to vcvarsall.bat>
> COMMAND ${CMAKE_PROGRAM} -GNinja <snip>)
A problem with both of these approaches is that on UNIX and in Make
the environment does not persist after the command exits. Whatever
wrapper tool is used must set the environment and also launch the
real command to be run under that environment. This is what the
"env" tool (and recently "cmake -E env") does. Of course on Windows
we need to run the .bat file to set the environment because we do
not know what variables it will set.
So, in order to do something like this we first need to identify a
proper abstraction to capture both cases.
Thanks,
-Brad
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers