On 08/22/2018 04:23 PM, Richard Shaw wrote:
> Currently I'm using an "include" of the toolchain file prior to calling
> "project" since 100% of development happens on a PC instead of having
> to pass the CMAKE_TOOLCHAIN_FILE option every time.

CMAKE_TOOLCHAIN_FILE must be used in order to be properly included
by try_compile projects and such.  One can't just include() it
manually.

> Here's the contents:
> 
> set(CMAKE_SYSTEM_NAME Generic)
> set(CMAKE_SYSTEM_PROCESSOR arm)
> set(CMAKE_SYSTEM_VERSION 1)
> 
> # specify the cross compiler
> set(CMAKE_C_COMPILER arm-none-eabi-gcc)
> set(CMAKE_CXX_COMPILER arm-none-eabi-cpp)

Add

```
set(CMAKE_C_FLAGS_INIT "--specs=nosys.specs")
set(CMAKE_CXX_FLAGS_INIT "--specs=nosys.specs")
```

and be sure to use CMake 3.7 or higher.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to