[CMake] Finding out what a preprocessor macro is defined as

Brandon Van Every bvanevery at gmail.com
Sat Dec 29 12:36:38 EST 2007


On Dec 29, 2007 10:20 AM, Matt Williams <lists at milliams.com> wrote:
>
> What I was hoping would be possible is for me to be able to run a cmake macro,
> something like
> INSPECT_CPP_MACRO(_BUILD_MODULE_ "../include/PlatformInformation.h"
> BUILD_MODULE) which would compile and run the header file and put the value
> of _BUILD_MODULE_ into BUILD_MODULE.

You want either TRY_COMPILE or TRY_RUN.


Cheers,
Brandon Van Every


More information about the CMake mailing list