Skip to content

Commit

Permalink
cmake: error out on building in IDF_PATH root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
renzbagaporo committed Apr 7, 2020
1 parent 52338e9 commit 4eb83ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
cmake_minimum_required(VERSION 3.5)
project(esp-idf C CXX ASM)

if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Current directory '${CMAKE_CURRENT_LIST_DIR}' is not buildable. "
"Change directories to one of the example projects in '${CMAKE_CURRENT_LIST_DIR}/examples' and try "
"again.")
endif()

unset(compile_options)
unset(c_compile_options)
unset(cxx_compile_options)
Expand Down

0 comments on commit 4eb83ca

Please sign in to comment.