[cmake-developers] Generating information for C++ tools in cmake (patch)

Brad King brad.king at kitware.com
Fri Jan 14 17:54:10 EST 2011


On 01/14/2011 05:46 PM, Manuel Klimek wrote:
> I'm currently trying to figure out the best point where to add that
> option...

In the cmMakefileTargetGenerator you can test for the option with

  this->Makefile->IsOn("...")

> Is there a good example I can base it on? So far I followed
> CMAKE_BUILD_TYPE through the code base, which suggests that I need to
> - find a .cmake file in modules in which I can put the option
> - document it in cmDocumentVariables

Probably like CMAKE_VERBOSE_MAKEFILE which is another option to the
Makefile generator.  See CMakeGenericSystem.cmake.  Surround it by

  if("${CMAKE_GENERATOR}" MATCHES "Make")
     ...
  endif()

so that it only shows up for Makefile generators.

-Brad



More information about the cmake-developers mailing list