[CMake] Checking Variables in a tool-chain file

Torsten at Robitzki.de Torsten at Robitzki.de
Mon Feb 4 01:42:58 EST 2019


Hi,

> Am 01.02.2019 um 17:17 schrieb frodak17 <frodak17 at gmail.com>:
> 
> 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 mostly only applies to the source file signature.

can you give me some details on the consequences? I’ve inserted following test into my tool-chain file (https://github.com/TorstenRobitzki/bluetoe/pull/39/commits/6067e808486c8421e6f3bf3a5dd9c14ab8aa6474):


        set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES ARM_GCC_TOOL_PATH)

	if (NOT DEFINED ARM_GCC_TOOL_PATH)
	    message(FATAL_ERROR "To configure the arm-none-eabi-gcc correctly, please set ARM_GCC_TOOL_PATH to the path that contains the bin directory of your GCC installation.")
	elseif(NOT EXISTS ${tools}/bin)
	    message(FATAL_ERROR "To configure the arm-none-eabi-gcc correctly, please set ARM_GCC_TOOL_PATH to the path that contains the bin directory of your GCC installation.")
	endif()

Will this fail eventually?

kind regards,

Torsten

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://cmake.org/pipermail/cmake/attachments/20190204/c6121579/attachment.sig>


More information about the CMake mailing list