[CMake] compile header file for precompiled gcc headers

Maik Beckmann maikbeckmann at gmx.de
Mon Dec 18 05:42:52 EST 2006


Am Montag, den 18.12.2006, 10:46 +0100 schrieb frederic heem:
>

Oops, forgot to mention two important things:

First:
At line
> c++-header -o ....gch/.c++ 
see
    .c++
so you didn't set CMAKE_BUILD_TYPE. If you run i.e.
    cmake -DCMAKE_BUILD_TYPE=Debug ../
the line above should change to
   c++-header -o ...gch/Debug.c++

Second:
You must add {CMAKE_CURRENT_BINARY_DIR} and ${CMAKE_CURRENT_SOURCE_DIR}
to the include dirs:
include_directories( 
	#... others
	${CMAKE_CURRENT_BINARY_DIR}  
	${CMAKE_CURRENT_SOURCE_DIR}
	#... others 	
	)


I'm using version 2.4.5, but the module doesn't use any recent cmake
features, AFAIK them.

I will work on this script soon to make it less error prone. 

Regards,
Maik



More information about the CMake mailing list