[CMake] GHS - specify cpu option to CMake generator?
frodak17
frodak17 at gmail.com
Fri Jul 19 20:13:17 EDT 2019
On Fri, Jul 19, 2019 at 2:52 PM Geoffroy J <geoffroy.jabouley at gmail.com>
wrote:
> Hello
>
> i have tried today to build a library using CMake Green Hills MULTI
> generator.
>
> It seemed to work quite well, but i end up not being able to configure the
> "-cpu" option for gbuild, which i need to set to "cortexa7".
>
> I've went through the CMake code, i think something similar to
> variable GHS_BSP_NAME would work, but does not seems available at the
> moment. Does it means it cannot be done at the moment?
>
> Do you know how to achieve this? Would using CFLAGS/LDFLAGS a viable
> solution?
>
> Thanks in advance for your answer
> Regards
>
>
I see -cpu as an option for armcc not for gbuild.
You should be able to pass the -cpu option per target like any other
compiler option.
So try using target_compile_options().
Some options are builder options so they don't start with a dash but with a
colon but it still should work with target_compile_options().
However my experience has been that is handled by the BSP .bld files for
the particular target / platform.
If the BSP target file has the wrong cpu in it then it probably could just
get updated and then it should "just work".
For example some of the .bld files contain a ":arm_cputype=cortexa8".
But I couldn't tell you exactly which files would need to be updated.
--
F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190719/94d2a94c/attachment.html>
More information about the CMake
mailing list