Hi all, Porting a collection of IAR Embedded Workbench projects to CMake/GCC.
The IAR projects make use of "preinclude headers" (header files that are automatically included in every source file in the project without being explicitly pulled in with a #include statement - not to be confused with precompiled headers). These map nicely to the GCC "-include <filename>" directive and I can manually implement it in my CMakeList.txt file as follows set(PREINCLUDE_FILE "${PROJ_BASE_DIR}/some-path/preinclude.h") ... if (PREINCLUDE_FILE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${PREINCLUDE_FILE}") endif() and generate a makefile that builds OK. However when I use CMake to generate an Eclipse project there is no consideration given to the preinclude header file(s). In my case the preinclude contains several preprocessor definitions that effectively drive the configuration of the rest of the system during compilation - without them the Eclipse CDT Indexer does not get all the definitions required to make sense of the codebase and requires additional manual configuration before it will do anything useful. Is there any way to automate this from the CMakeList.txt file?
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake