On Tue, Feb 1, 2011 at 3:56 AM, Johan Björk <p...@spotify.com> wrote:
> Hey David,
>
> What is the intended behavior when upgrading CMake on a OSX Machine?
> It seems that currently, generated projects will keep a reference to
> the resolved symlink, ie
> /Applications/CMake\ VERSION/Contents/bin/..., causing confusing errors such 
> as
>
> Johan-Bjorks-MacBook-Pro-2:build-Debug-normal phb$ cmake --build .
> No such file or directory
> CMake Error: Generator: execution of make failed. Make command was:
> /Applications/CMake\
> 2.8-3.app/Contents/bin/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild
> -project spcore.xcodeproj build -target ALL_BUILD -configuration Debug
>
> It seems only some of the variables in CMakeCache is updated to
> reflect the new cmake path
> CMAKE_COMMAND:INTERNAL=/Applications/CMake 2.8-4.app/Contents/bin/cmake
> CMAKE_CPACK_COMMAND:INTERNAL=/Applications/CMake 2.8-4.app/Contents/bin/cpack
> CMAKE_CTEST_COMMAND:INTERNAL=/Applications/CMake 2.8-4.app/Contents/bin/ctest
> CMAKE_ROOT:INTERNAL=/Applications/CMake 2.8-4.app/Contents/share/cmake-2.8
> others are not
> CMAKE_MAKE_PROGRAM:FILEPATH=/Applications/CMake
> 2.8-3.app/Contents/bin/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild
> MAKECOMMAND:STRING=/Applications/CMake\
> 2.8-3.app/Contents/bin/cmakexbuild -project spcore.xcodeproj build
> -target ALL_BUILD -configuration ${CTEST_CONFIGURATION_TYPE}
> CMAKE_BUILD_TOOL:INTERNAL=/Applications/CMake
> 2.8-3.app/Contents/bin/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild/cmakexbuild
> CMAKE_EDIT_COMMAND:INTERNAL=/Applications/CMake 2.8-3.app/Contents/bin/ccmake
>
> (No clue how it added all those copies of cmakexbuild, I ran my
> dashboard a few times before realizing what was wrong)
>
> /Johan
>
>
> /Johan
>

The intended behavior is.... "it depends."

CMake always honors a pre-existing cache, and simply trusts that it is
correct. Usually, updating CMake only adds possible cache entries, and
does not frequently change existing cache entries, so it's usually
safe to just run the new cmake and go. But... if there is stale stuff
in a cache, the safest thing to do is to blow it away and start from
scratch.

Whenever I update CMake on any machine, I typically start with clean
builds just to be safe.

On Mac OSX, since we have the 3 digit version number in the name of
the app, going from 2.8.3 to 2.8.4 changes paths, as you've observed.
I would recommend starting from a clean build tree whenever changing
versions of CMake.


Hope this helps,
David
_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to