#CMake custom IAR toolchain issues

5 messages · Page 1 of 1 (latest)

signal cedar
#

[posting here, because there is an open thread on #tooling that I don't want to interrupt]

I have added a custom toolchain for my IAR compiler suite following these instructions:
https://github.com/IARSystems/cmake-tutorial

I still have a few other CMake issues, but when I now run CMake pointing it at this toolchain file, I get the following messages

CMake Error: Could not find cmake module file: CMakeDetermineCPPCompiler.cmake
CMake Error: Could not find cmake module file: C:/Projects/xxx/out/build/EWARM/CMakeFiles/3.26.1/CMakeCPPCompiler.cmake
CMake Error: Could not find cmake module file: CMakeCPPInformation.cmake
CMake Error: Could not find cmake module file: CMakeTestCPPCompiler.cmake

CMake appears to get past these issues and carries on, but these messages have me worried.
Anyone with any idea what CMake is trying to tell me?
And what I can do about it?

I found this article: https://stackoverflow.com/questions/61814019/getting-could-not-find-cmake-module-file-cmakedetermineversioncompiler-cmake

Almost similar, and the problem seems routed in a simple typo in the CMakeLists.txt.

GitHub

A short tutorial on how to build and test embedded software using the IAR C/C++ Compiler alongside CMake. - GitHub - IARSystems/cmake-tutorial: A short tutorial on how to build and test embedded so...

opaque micaBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

signal cedar
#

I did have to make a modification to this toolchain file.
Out of the box it only does

find_program(CMAKE_CXX_COMPILER ...)

But then I get a CMake error No CMAKE_CPP_COMPILER could be found

So I duplicated that instruction underneath the existing one and change its var to

find_program(CMAKE_CPP_COMPILER ...)

Does CMake require both?
Is one obsoleted?

signal cedar
#

I am dumb.
The top level CMakeLists.txt file reads

project(SourceSimulator LANGUAGES CPP)

That should of course read CXX.

#

!solved