cmake: raise error if previous make build was not cleaned
Uncleanded make build can cause various cmake errors. It's better to stop cmake build early and display an error.
This commit is contained in:
parent
c93c0ecd81
commit
b90c6b5b20
|
@ -67,6 +67,12 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||
|
||||
set(NUTTX_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# unceaned previous make build can cause various types of cmake error
|
||||
if(EXISTS "${NUTTX_DIR}/.config")
|
||||
message(
|
||||
FATAL_ERROR "Please distclean previous make build with `make distclean`")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED BOARD_CONFIG)
|
||||
message(FATAL_ERROR "Please define configuration with BOARD_CONFIG")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue