[Cmake] Fwd: CMake improvment

Bill Hoffman bill.hoffman at kitware.com
Mon Apr 30 10:07:32 EDT 2001


Sounds like a good idea here at Kitware, go ahead and commit.


-Bill

>From: "Cross, Geoff (CRD)" <crossge at crd.ge.com>
>To: "'bill.hoffman at kitware.com'" <bill.hoffman at kitware.com>
>Subject: CMake improvment
>Date: Mon, 30 Apr 2001 09:13:10 -0400
>X-Mailer: Internet Mail Service (5.5.2653.19)
>
>Bill,
>
>I order to make my life easier with CMake and vxl, I thought it would be nice to have an "INCLUDE"
>command, and therefore I have implemented the following, but thought I would check with you before
>committing (added to which, I have only tested under NT and solaris, so it might break things
>temporarily: would you like me to cvs branch?):
>
>INCLUDE(a/b c/d)
>
>is almost identical to a C-like #include in that the source files a/b and c/d are pasted in from
>wherever they are.  This involved a few subtle changes to cmMakefile.cxx, cmDSPGenerator (to get the
>dependencies right)...
>
>The beauty of this is that now I can have a CMakeLists.txt file like this:
>
># compile part
>ADD_EXECUTABLE(something something_sources)
>SOURCE_FILES(something_sources ...)
>
># link part
>#  uses v3p, vxl, oxl
>INCLUDE( ${vxl_SOURCE_DIR}/v3p/CMakeListsLink.txt )
>INCLUDE( ${vxl_SOURCE_DIR}/vxl/CMakeListsLink.txt )
>INCLUDE( ${vxl_SOURCE_DIR}/oxl/CMakeListsLink.txt )
>
>rather than having to put in a whole string of LINK_LIBRARY commands in each executable
>CMakeLists.txt file.
>
>Anyway, what do you think?  Any problems with me committing this?  Should this be posted to the CMake
>mailing list?
>
>Geoff. 





More information about the CMake mailing list