Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

CLion integration not working (include error) #49

@jenswet

Description

@jenswet

Hello,

I tried to create a new CLion project and copied the 0.6 release at my project.

This is my CMakeLists.txt:

cmake_minimum_required(VERSION 3.12)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/Arduino-Toolchain.cmake)
project(Arduino LANGUAGES C)

get_board_id(board_id mega atmega2560)
add_arduino_executable(${PROJECT_NAME} ${board_id} main.c)
upload_arduino_target(${PROJECT_NAME} "${board_id}" COM3)

My folder structure is:
Arduino (CLion project root)

  • cmake (contains the whole 0.6 release)
  • CMakeLists.txt
  • main.c

Unfortunately I get this error.

/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/jens/Downloads/Arduino
CMake Error at cmake/Arduino-Toolchain.cmake:1 (include):
  include could not find load file:

    Platform/Other/ArduinoSDKSeeker.cmake
Call Stack (most recent call first):
  /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.12/Modules/CMakeDetermineSystem.cmake:94 (include)
  CMakeLists.txt:3 (project)


CMake Error at cmake/Arduino-Toolchain.cmake:66 (find_arduino_sdk):
  Unknown CMake command "find_arduino_sdk".
Call Stack (most recent call first):
  /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.12/Modules/CMakeDetermineSystem.cmake:94 (include)
  CMakeLists.txt:3 (project)


CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

[Finished]

I couldn't find any solution on github. I already tried a cmake command line parameter instead of the set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/Arduino-Toolchain.cmake). This didn't help. I also tried different relative and absolute paths without success.

Can anyone help me?

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential bug in codehelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions