> I wanted to do some looping in macros which are not
> possible in GNU
> CPP. So, I wrote
> macros in m4. I wish to pre-process all my C/C++ code with
> m4 before
> handing it over to
> gcc. I did not find any direct way out for doing this in
> cmake. Any
> ideas how to do it with
> cmake?
Use ADD_CUSTOM_COMMAND to call m4 preprocessor and OUTPUT file.cpp
Then use SET_SOURCE_FILES_PROPERTIES set GENERATED TRUE
and then include file.cpp into a list of sources for compilation.
Denis
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake