[CMake] Directory includes during assembling

Alexander Neundorf a.neundorf-work at gmx.net
Wed Oct 13 16:26:08 EDT 2010


On Wednesday 13 October 2010, Martin Nielsen wrote:
> Hi
>
>
>
> I new to CMake and trying to create a build system that uses a custom
> toolchain. So far I managed to get most of it working but have a small
> problem with some assembling.
>
> I have added this code to the toolchain file:
>
>
>
> find_program(CMAKE_ASM_COMPILER NAMES armasm PATHS
> ${CSR_SYNERGY_ARM_PATH_BIN})
>
> set (ARM_PROCESSOR "--cpu ARM1176JZ-S --fpu SoftVFP+VFPv2")
>
> set (CMAKE_ASM_FLAGS_INIT           "--predefine \"BDB SETA 2\"")
>
> set (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -g --keep
> ${ARM_PROCESSOR} --apcs /interwork --no_unaligned_access <FLAGS> -o
> <OBJECT> <SOURCE>")
>
>
>
> The problem is the <FLAGS> parameter inserts all the include directories
> as "DIR1" "DIR2" and not -I"DIR1" -I"DIR2". Does there exists some rule
> that defines how include directories are turned into <FLAGS>?
>

Did you try the following ?
SET(CMAKE_INCLUDE_FLAG_ASM "-I") 

Alex


More information about the CMake mailing list