Skip to content

CXX_EXTRA_FLAGS does not support passing multiple flags #4

@andreipoe

Description

@andreipoe

Building fails when CXX_EXTRA_FLAGS contains more than one flag:

cmake -Btest -H. -DCMAKE_BUILD_TYPE=Release -DSYCL_RUNTIME=HIPSYCL -DCXX_EXTRA_FLAGS='-march=armv8.3-a+sve -ffp-contract=fast'
cmake --build test --target clover_leaf --config Release -j 1 -v

The flags aren't properly passed to the compiler (full paths removed for clarity):

...
[  3%] Building SYCL object CMakeFiles/clover_leaf.dir/src/accelerate.cpp.o
syclcc-clang  -I... -W...  -O3 "-march=armv8.3-a+sve -ffp-contract=fast" -pthread -o ...
cc1plus: error: invalid feature modifier in ‘-march=armv8.3-a+sve -ffp-contract=fast’

Setting a single flag, e.g. -DCXX_EXTRA_FLAGS=-march=armv8.3-a+sve, works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions