[CMake] Problem with ADD_CUSTOM_COMMAND and compiler

s.bedouet at voila.fr s.bedouet at voila.fr
Fri Oct 17 09:44:26 EDT 2008


Hi,
I try to generate preprocessed files with gcc (gcc -E) and ADD_CUSTOM_COMMAND.
I use INCLUDE_DIRECTORIES in order to specify where the include files are but this has not effect and so gcc generates an error :

ADD_CUSTOM_COMMAND(OUTPUT hello.pp.c
COMMAND ${CMAKE_C_COMPILER} -E hello.c > hello.pp.c 
MAIN_DEPENDENCY hello.pp.c) 

hello.c :

#include <iostream.h>
#include "hello.h"
void main()
{
std::cout << "Hello !<< std::endl;
}

...and I don't want to add include file in ADD_CUSTOM_COMMAND...

Any idea ?
Thanks for help.
Sébastien

____________________________________________________

Écoutez gratuitement Amy Winehouse sur Voila et découvrez d'autres titres en affinité avec vos goûts musicaux ! http://musiline.voila.fr/resume/3599
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081017/2b94b7c2/attachment.htm>


More information about the CMake mailing list