[CMake] Disable pretty output

David Sveningsson ext at sidvind.com
Mon May 19 12:35:21 EDT 2008


Mike Jackson skrev:
> make VERBOSE=1 will show EVERYTHING that is being done.
> 

Ok, that works.

Now I found some errors which I'm having. My code must be compiled with 
either NDEBUG or _DEBUG defined. I thought this would work:

set( CMAKE_CXX_FLAGS "-Wall -O2 -DNDEBUG" )
set( CMAKE_CXX_FLAGS_DEBUG "-Wall -g -D_DEBUG" )
set( CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG" )

I now understand that the debug and release flags is appended to 
CMAKE_CXX_FLAGS. However I would like it to default to the release flags 
so that if no build type is specified release is used. Compilation fails 
if neither/both is defined.

As I understood  CMAKE_BUILD_TYPE cannot be used for this purpose 
becauuse it might not be initialized and might be changed.

Btw, there is lots of stuff in my CMakeLists.txt that isn't really 
portable, I'm still learning alot about cmake and target GNU/Linux with 
regular makefiles. I won't use CMake to replace a static MSVC project yet.

> 
> On May 19, 2008, at 11:51 AM, David Sveningsson wrote:
> 
>> Hi, more newbie questions. The GNU Makefiles generated CMake has some 
>> nice colored output, progress etc. However I would like to disable 
>> this and see each command that is run (debugging purpose).
>>



-- 


//*David Sveningsson [eXt]*

Freelance coder | Game Development Student
http://sidvind.com

Thou shalt make thy program's purpose and structure clear to thy fellow 
man by using the One True Brace Style, even if thou likest it not, for 
thy creativity is better used in solving problems than in creating 
beautiful new impediments to understanding.


More information about the CMake mailing list