How to specify a compiler in CMake?

后端 未结 5 1490
粉色の甜心
粉色の甜心 2020-12-03 02:50

I would like to use the IAR compiler. I noticed CMake has already have a bunch of files about this compiler:

https://github.com/jevinskie/cmake/blob/master/Modules/C

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 03:33

    You can call cmake like this:

    cmake -DCMAKE_C_COMPILER=iccarm ...
    

    or

    cmake -DCMAKE_CXX_COMPILER=...
    

提交回复
热议问题