[cmake-developers] strange problem with try_compile
Brad King
brad.king at kitware.com
Fri Aug 27 13:09:48 EDT 2010
On 08/27/2010 12:01 PM, Alexander Neundorf wrote:
> In IAR.cmake (included by IAR-C.cmake) I have:
> FIND_PROGRAM(CMAKE_IAR_LINKER ilinkarm HINTS "${_CMAKE_TOOLCHAIN_LOCATION}" )
This find_program() is executing inside the try_compile (separtely
from the instance in the main project). That's the one that fails
to find it even though it is set in the outer project.
My guess is that _CMAKE_TOOLCHAIN_LOCATION is not making it into
the try_compile-d project CMake code. You'll have to add it to
the try_compile call with the CMAKE_FLAGS option.
-Brad
More information about the cmake-developers
mailing list