Re: [CMake] Checking Variables in a tool-chain file

2019-02-03 Thread Torsten
Hi, > Am 01.02.2019 um 17:17 schrieb frodak17 : > > Be aware that CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only works with the > try_compile() command source file signature. Unfortunately it doesn't work > with try_compile() whole projects signature. The section on Other Behavior > Settings mostl

Re: [CMake] Checking Variables in a tool-chain file

2019-02-01 Thread frodak17
Be aware that CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only works with the try_compile() command source file signature. Unfortunately it doesn't work with try_compile() whole projects signature. The section on Other Beh

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Torsten
> Am 31.01.2019 um 21:10 schrieb Craig Scott : > > 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!

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Shoaib Meenai
" Cc: CMake MailingList Subject: Re: [CMake] Checking Variables in a tool-chain file This is precisely the scenario that the CMAKE_TRY_COMPILE_PLATFORM_VARIABLES<https://urldefense.proofpoint.com/v2/url?u=https-3A__cmake.org_cmake_help_latest_variable_CMAKE-5FTRY-5FCOMPILE-5FPLATFORM-5FVAR

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Craig Scott
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(). On

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Shoaib Meenai
We have a somewhat similar problem with LLVM's toolchain file for cross-compiling to Windows, and we solve it there by saving and restoring cache variables from the environment inside the toolchain file itself. See https://reviews.llvm.org/diffusion/L/browse/llvm/trunk/cmake/platforms/WinMsvc.cm

Re: [CMake] Checking Variables in a tool-chain file

2019-01-31 Thread Torsten
Hi Sergei, > Am 31.01.2019 um 08:42 schrieb Sergei Nikulov : > > Just guessing maybe better use $ENV{ARM_GCC_TOOL_PATH} ? > https://cmake.org/cmake/help/latest/variable/ENV.html?highlight=env Well, but this would mean, I had to configure CMake not only with Cache variables: cmake -DARM_GCC_TOO

Re: [CMake] Checking Variables in a tool-chain file

2019-01-30 Thread Sergei Nikulov
чт, 31 янв. 2019 г. в 10:29, Torsten Robitzki : > > Hi, > I have a tool-chain file, which requires a variable to be set to the path to > the compiler on the local machine: > > set(CMAKE_C_COMPILER ${ARM_GCC_TOOL_PATH}/bin/arm-none-eabi-gcc) > set(CMAKE_CXX_COMPILER ${ARM_GCC_TOOL_PATH}/bin/arm