Discussion:
[CMake] vcproj .user files
Surya Kiran Gullapalli
2010-02-18 10:59:05 UTC
Permalink
Hello all,
I'm facing a weird problem with CONFIGURE_FILE on windows with CMake-2.8.1
(RC3)
I've followed the steps outlined
here<http://stackoverflow.com/questions/1005901/how-to-set-path-environment-variable-using-cmake-and-visual-studio-to-run-test/1151593>
to
set PATH environment variable for an executable.

The problem is, when I click configure, .user file is created fine with out
any issues. But when i click "Generate", the created file is overwritten by
the one generated by VS.

Lets say I've this line in The template file *
Environment="PATH=@PATH_ENV_VARIABLE@",*
when i click *Configure*, the PATH_ENV_VARIABLE is properly substituted. But
once I *Generate * the solution, the above said line in .user file becomes *
Environment=""*, which is default.

What is going wrong here ?

Thanks,
Surya
Ryan Pavlik
2010-02-18 13:52:32 UTC
Permalink
Make sure you have quit the visual studio instance in that build directory -
VS assumes that only it modifies the .vcproj.user files, so it does not
detect changes and will overwrite a modified file. At least with 2.8.0,
this works fine when visual studio is closed.

Ryan

On Thu, Feb 18, 2010 at 4:59 AM, Surya Kiran Gullapalli <
Post by Surya Kiran Gullapalli
Hello all,
I'm facing a weird problem with CONFIGURE_FILE on windows with CMake-2.8.1
(RC3)
I've followed the steps outlined here<http://stackoverflow.com/questions/1005901/how-to-set-path-environment-variable-using-cmake-and-visual-studio-to-run-test/1151593> to
set PATH environment variable for an executable.
The problem is, when I click configure, .user file is created fine with out
any issues. But when i click "Generate", the created file is overwritten by
the one generated by VS.
Lets say I've this line in The template file *
when i click *Configure*, the PATH_ENV_VARIABLE is properly substituted.
But once I *Generate * the solution, the above said line in .user file
becomes *Environment=""*, which is default.
What is going wrong here ?
Thanks,
Surya
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.cmake.org/Wiki/CMake_FAQ
http://www.cmake.org/mailman/listinfo/cmake
--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

***@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
Surya Kiran Gullapalli
2010-02-18 15:01:58 UTC
Permalink
Post by Ryan Pavlik
Make sure you have quit the visual studio instance in that build directory
- VS assumes that only it modifies the .vcproj.user files, so it does not
detect changes and will overwrite a modified file. At least with 2.8.0,
this works fine when visual studio is closed.
Ryan
But it overwrites again when VS is started. Also, when ever I modify
CMakeLists.txt, I've to quit VS, this is a problem. I'll have to think some
other solution.

Surya
Ryan Pavlik
2010-02-18 15:17:04 UTC
Permalink
If it is overwriting, that means that the file you wrote was invalid.
Before starting VS, open the generated file and see if it matches what
you think it should - possible issues:
paths in cmake format rather than native format
incorrect quoting
incorrect path separators

I know that this works, because I do it.

Ryan
Post by Ryan Pavlik
Make sure you have quit the visual studio instance in that build
directory - VS assumes that only it modifies the .vcproj.user
files, so it does not detect changes and will overwrite a modified
file. At least with 2.8.0, this works fine when visual studio is
closed.
Ryan
But it overwrites again when VS is started. Also, when ever I modify
CMakeLists.txt, I've to quit VS, this is a problem. I'll have to think
some other solution.
Surya
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
http://www.cmake.org/mailman/listinfo/cmake
--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University

***@iastate.edu
http://academic.cleardefinition.com/
Loading...