[CMake] disabling CMAKE_COLOR_MAKEFILE in the kdevelop generator

William A. Hoffman billlist at nycap.rr.com
Fri Apr 7 23:07:22 EDT 2006


At 10:44 PM 4/7/2006, Tanner Lovelace wrote:
>On 4/7/06, Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
>> Hi,
>>
>> I think in the kdevelop project generator the cmake options
>> CMAKE_COLOR_MAKEFILE should always be disabled and CMAKE_VERBOSE_MAKEFILE
>> should always be enabled.
>> How/where do I do this ?
>> The reason: the log window of kdevelop doesn't interpret the color codes,
>> so you only see the control characters, and kdevelop itself shortens the
>> ouput, so that there is no problem with the full output.
>>
>> So, where to do it ?
>
>How about putting something like this in the main CMakeLists.txt file?
>
>IF(CMAKE_GENERATOR MATCHES "KDevelop3")
>  SET(CMAKE_COLOR_MAKEFILE OFF)
>  SET(CMAKE_VERBOSE_MAKEFILE ON)
>ENDIF(CMAKE_GENERATOR MATCHES "KDevelop3)

I think this has to be done in the generator so that projects can not set values
that cause kdevelop not to work.

For the color stuff, you can just set this in the constructor
cmGlobalKdevelopGenerator()
{
this->ToolSupportsColorVT100 = false
}

For the VERBOSE stuff, you can do this:
Add an ivar to cmLocalUnixMakefileGenerator3
bool ForceVerbose;
initialize it to false in cmLocalUnixMakefileGenerator3.
But in cmLocalKdevelopGenerator() set it to true.

Then in cmLocalUnixMakefileGenerator3
::WriteSpecialTargetsTop()

 if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE") || this->ForceVerbose)

Alternatively, you could make sure that when kdevelop runs make
it always does make VERBOSE=1.

Figure what works best and send me a patch.

-Bill






More information about the CMake mailing list