cmake: Allow selecting toolchain file based on config

Refactor IDF "project" functionality under a wrapping of the default
"project" command, so we can tweak it a bit...

Will need more testing in other environments.
This commit is contained in:
Angus Gratton
2018-02-15 14:38:58 +11:00
committed by Angus Gratton
parent 04a944598f
commit abef220b13
6 changed files with 83 additions and 63 deletions
@@ -1,10 +1,8 @@
# The following five lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(CMAKE_TOOLCHAIN_FILE $ENV{IDF_PATH}/toolchain.cmake)
project(hello-world ASM C CXX)
set(MAIN_SRCS main/hello_world_main.c)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hello-world)