Skip to content

Instantly share code, notes, and snippets.

@magnusja
Created November 2, 2015 23:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magnusja/571cabecbecadb6b4fab to your computer and use it in GitHub Desktop.
Save magnusja/571cabecbecadb6b4fab to your computer and use it in GitHub Desktop.
Arduino CMake example (CLion)
cmake_minimum_required(VERSION 2.8.4)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/ArduinoToolchain.cmake)
set(PROJECT_NAME ard)
project(${PROJECT_NAME})
set(ARDUINO_DEFAULT_PORT /dev/cu.usbmodemfd121)
set(${CMAKE_PROJECT_NAME}_SKETCH ard.ino)
generate_arduino_firmware(${CMAKE_PROJECT_NAME})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment