[CMake] Build flags not applied during compiler testing on Ubuntu
Brad King
brad.king at kitware.com
Mon Aug 27 13:43:16 EDT 2018
On 08/25/2018 05:48 PM, Richard Shaw wrote:
> set(CMAKE_EXE_LINKER_FLAGS "-T${CMAKE_SOURCE_DIR}/stm32_flash.ld")
>
> The build dir is the binary directory, not the source directory...
Toolchain files cannot reference variables like CMAKE_SOURCE_DIR
that depend on the source and build tree locations. They are loaded
inside try_compile projects in addition to the main project, and those
have their own source and build trees.
-Brad
More information about the CMake
mailing list