Re: [CMake] use of ${cmake_command}

2010-04-05 Thread Eric Noulard
2010/4/5 AKHRES Nader nader.akh...@laposte.net:
 Hello,

 I've seen some examples where ${CMAKE_COMMAND} is used instead of cmake,
 typically in post build command
 Is it a better practice for portability?

Yes. This way you can be sure to use the very same 'cmake' that you used
to configure/build the project and not the one found in te path.

In fact you can invoke cmake like that:

cd yourbuilddir
/absolute/path/to/my-cmake/cmake path-source

my-cmake may be:
   - a git master CMake (i.e. not a release)
   - a patched CMake because you are trying some enhancement not
 yet published upstream
   - an older cmake version 2.4.x because you have to keep your project
 backward compatible
   - a cmake version you installed on your account because you
 do not have enough right on this particular host to upgrade
 system-wide
etc.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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


Re: [CMake] use of ${cmake_command}

2010-04-05 Thread Ryan Pavlik
Yes, since the cmake that is in the user's PATH might not be the cmake 
they are using/want to use. Generally, avoid hardcoding 
application/executable names or locations.


Ryan

On 4/5/10 4:00 PM, AKHRES Nader wrote:

Hello,

I've seen some examples where ${CMAKE_COMMAND} is used instead of 
cmake, typically in post build command

Is it a better practice for portability?

Nad



--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com/

___
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