[CMake] cmake // how to get compiler default include search path

Sergey Nikulov sergey.nikulov at gmail.com
Wed Apr 22 18:56:04 EDT 2009


Thank you, Alex.

Will check it.

2009/4/23 Alexander Neundorf <a.neundorf-work at gmx.net>:
> On Wednesday 22 April 2009, Sergey Nikulov wrote:
>> Hi All,
>>
>> Could you please suggest me how to get default compiler include search
>> path with cmake?
>>
>> For example gcc -c -v empty.c gives
>>
>> <... skip ...>
>> #include "..." search starts here:
>> #include <...> search starts here:
>>  /usr/local/include
>>  /usr/lib/gcc/i386-redhat-linux/4.1.1/include
>>  /usr/include
>> End of search list.
>> <... skip ...>
>>
>> Is that information available within Cmake in cross platform way?
>> Something like CMAKE_<LANG>_DEFAULT_INCLUDE_PATH?
>
> You can have a look at Modules/CMakeEclipseCDT4Generator.cmake, it does just
> that.
> But this is new and internal-only, so don't rely on the code staying there
> unchanged (but you can use it as inspiration).
>
> Alex
> _______________________________________________
> 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
>



-- 
Best Regards,
Sergey Nikulov


More information about the CMake mailing list