[CMake] Checking Variables in a tool-chain file

frodak17 frodak17 at gmail.com
Fri Feb 1 11:17:32 EST 2019


Be aware that CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only works with the
try_compile()
<https://cmake.org/cmake/help/latest/command/try_compile.html#command:try_compile>
command source file signature. Unfortunately it doesn't work with
try_compile() whole projects signature.  The section on Other Behavior
Settings mostly only applies to the source file signature.

On Fri, Feb 1, 2019 at 2:02 AM <Torsten at robitzki.de> wrote:

>
> > Am 31.01.2019 um 21:10 schrieb Craig Scott <craig.scott at crascit.com>:
> >
> > This is precisely the scenario that the
> CMAKE_TRY_COMPILE_PLATFORM_VARIABLES variable is meant for. It allows a
> toolchain file to specify additional variables that should be passed along
> to try_compile().
>
> Works like a charm. Thanks a lot!
>
> Torsten
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190201/6000a9d1/attachment.html>


More information about the CMake mailing list