iarsystems / cmake-tutorial

Build and test embedded software using the IAR C/C++ Compiler alongside CMake
https://iar.com
MIT License
76 stars 14 forks source link

STM8 C++ project request "Linker language" propery to be set. #9

Closed AlxrMironovOldAcc closed 2 years ago

AlxrMironovOldAcc commented 2 years ago

Hello. Project with main.c seems to compiles fine. But main.cpp fall with "CMake can not determine linker language for target" error on CMake initialization.

If Im add next string to CMakeLists.txt: set_target_properties( PROPERTIES LINKER_LANGUAGE CXX) Then, the cmake initalizes, but main.cpp ignored on compilation. The empty project will builded.

AlxrMironovOldAcc commented 2 years ago

Issue was in wrong language definition in project(). Only C was defined.