CMake: how to change compiler for individual target

后端 未结 3 726
庸人自扰
庸人自扰 2021-02-04 04:14

I have embedded project using cross compiler. I would like to introduce Google test, compiled with native GCC compiler. Additionally build some unit test targets with CTC compil

3条回答
  •  旧巷少年郎
    2021-02-04 04:49

    CMake is a make file generator. It generates a file that you can then use to build. If you want to more than one target platform, you need to run CMake multiple times with different generators.

    So what you want to do is not possible in CMake, but with CMake: You can create a shell script that invokes CMake multiple times.

提交回复
热议问题