[CMake] Action to perform unconditionally

Ryan Pavlik rpavlik at iastate.edu
Wed Feb 2 08:09:07 EST 2011


You'll want to add a custom command/target - you might consider taking
a peek at this module, which does effectively that for Git.
https://github.com/rpavlik/cmake-modules/blob/master/GetGitRevisionDescription.cmake

Ryan

On Wed, Feb 2, 2011 at 6:44 AM, Ilja Golshtein <ilejncs at narod.ru> wrote:
> Hello!
>
> I am trying to generate version.h in my project as described http://addisu.taddese.com/blog/inserting-svn-revision-number-in-your-cc-code/
>
> I think the most natural place to do it is my project root CMakeLists.txt.
> The problem is it does not contain any target - just setting some variables and add_subdirectory(src)
>
> The question is what is the best way to perform an action make-time unconditionally.
>
> Thanks.
>
> --
> Best regards,
> Ilja Golshtein.
> _______________________________________________
> 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
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik


More information about the CMake mailing list