[CMake] Check for defined preprocessor symbol

Leif Walsh leif.walsh at gmail.com
Sun Feb 17 13:18:53 EST 2013


CHECK_SYMBOL_EXISTS should suffice

Sent from my iPhone

On Feb 17, 2013, at 13:11, Gregor Jasny <gjasny at googlemail.com> wrote:

> Hello,
> 
> I need a function to check for existing preprocessor symbols.
> Something like
> 
> CHECK_C_PREPROCESSOR_SYMBOL_EXISTS("__i386__", X86)
> CHECK_C_PREPROCESSOR_SYMBOL_EXISTS("__x86_64__", X64)
> 
> I guess a hack would be to (ab)use CHECK_TYPE_SIZE for this, but is the
> a more elegant solution?
> 
> Thanks,
> Gregor
> --
> 
> 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


More information about the CMake mailing list