Skip to content

Extra Generator: Fix handling of CMAKE_<LANG>_COMPILER_ARG1

Adam Oleksy requested to merge admo/cmake:split_arguments into master

Teach CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs how to expand this string into arguments.

The arguments to the compiler are treated as a one arguments, which cause that the compiler treat it as a source filename. Splitting _arg1 variable to the list fix the problem.

In my case _arg1 is "-march=armv8-a -mtune=cortex-a57.cortex-a53 --sysroot=/opt/eb-tiny/2.4.2/sysroots/aarch64-poky-linux" which cause gcc error that _arg1 can be opened. Splitting _arg1 into list solved the problem, and compiler treats _arg1 as a set of arguments, but not as a file.

Topic-rename: extra-generator-split-arg1

Edited by Brad King

Merge request reports