[CMake] cpp macro
Eric Noulard
eric.noulard at gmail.com
Mon Jun 4 04:16:47 EDT 2018
Le lun. 4 juin 2018 à 09:59, Stéphane Ancelot <sancelot at numalliance.com> a
écrit :
> hi
>
> is there a mactro for cpp ?
>
You mean a CMake variable which would contain the path to C preprocessor
binary?
I don't think so, at list no xxx_<LANG>_xxx variable seems to exists for
that.
Did you check "cmake --help-variable-list" ?
May be you can ask the compiler to act a the C pre-processor?
clang and gcc both accept the '-E' command line option to only run the
preprocessor.
otherwise you may probably call
find_program(C_PREPROCESSOR NAMES cpp)
In both cases I don't know how to discover that in a cross-platform way.
Probably MSVC has another option for pre-processsing.
Eric
>
> Regards,
>
> S.Ancelot
> --
>
> 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:
> https://cmake.org/mailman/listinfo/cmake
>
--
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180604/a0f9778d/attachment.html>
More information about the CMake
mailing list