Notes |
|
(0017457)
|
Bill Hoffman
|
2009-09-14 14:07
|
|
I am not sure if this is possible. I think those env vars are stored globally maybe in some registry entry, not sure, but I don't think they are in the project files. |
|
|
(0017814)
|
Mateusz Loskot
|
2009-09-29 06:21
|
|
|
|
(0017815)
|
Mateusz Loskot
|
2009-09-29 06:24
|
|
|
|
(0018025)
|
jneuhaus
|
2009-10-08 08:35
|
|
It is definitely possible to store custom environment variables per project in the project files.
They are stored in a file with the following naming scheme at the same folder as the .vcproj file: [project name].vcproj.[user domain].[user name].user
To set them with the VS GUI:
[executable project]-->Properties-->Configuration
Properties-->Debugging-->Environment
They will become active when the project is executed. |
|
|
(0018040)
|
Mateusz Loskot
|
2009-10-08 14:40
|
|
@jneuhaus I know well that it's possible to configure environment for Visual Studio projects using GUI of the IDE. What I'm interested in is exactly what is requested in this feature request: Set Visual Studio project "custom environment variables" setting with CMake. |
|
|
(0018053)
|
Patrick Moseley
|
2009-10-09 15:19
|
|
We have the case of using CMake in a cross platform environment and would like to have this functionality not only for Visual Studio, but for Eclipse and XCode as well.
Rather than coming up with something for each of the different generators for the different platforms, it would be nice to have a CMake command that would allow you to set locations of additional "shared libraries" needed to execute the application built with CMake inside the various IDEs supported as generator targets. So on Windows (Visual Studio) it would add the directories to the PATH environment variable, on Unix (Eclipse) it would set the LD_LIBRARY_PATH, and on Mac (XCode) it would set the DYLD_LIBRARY_PATH environment variable. |
|
|
(0018057)
|
jneuhaus
|
2009-10-12 04:23
|
|
Our project needs the correct Debug/Release version of multiple DLLs.
VS allows to use the keyword '$(OutType)' in the custom PATH setting. It will be replaced by Debug/Release when the executable is started by Visual Studio. Therefore, we can simply switch between Debug/Release configuration in Visual Studio and it will find the correct DLLs.
Another use case is that we want to set certain environment variables with different values for different executable projects in the same solution.
It would be nice, if CMake would allow to set the custom environment variables, so that we do not have to re-set them after cmake re-generates the project. |
|
|
(0028445)
|
Andrew Hill
|
2012-02-01 23:22
|
|
|
|
(0041542)
|
Kitware Robot
|
2016-06-10 14:27
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|