[Cmake] Another gripe about CMake
Ken Martin
ken.martin at kitware.com
Wed Dec 11 13:58:44 EST 2002
> Thanks Ken, that's what I thought. I still think that it is premature
> place
> for CMake to do this in the code: What if I don't want to use modules,
or
> use them from another location?
If you don't want to use modules you simply don't include them in your
CMakeLists file. Modules are sort of like header files in C code. If you
don't want to use math.h then you don't include it. No one forces you to
use math.h in your code. Finding the modules is just used to set the
CMAKE_ROOT variable which can then be used in your CMakeLists file. For
example, if you add the following line to a CMakeList file
INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)
It will include the CMake standard FindTcl module. If you want your own
FindTcl module then just change the argument to your INCLUDE command to
be
INCLUDE (${MY_PROJECT_SOURCE_DIR}/MyModules/FindTcl.cmake)
Or
INCLUDE ($ENV{MY_SECRET_MODULES}/FindTcl.cmake)
Etc...
Thanks
Ken
More information about the CMake
mailing list