Skip to content

Commit

Permalink
cmake: look for tools in first invocation only
Browse files Browse the repository at this point in the history
There is no need to locate tools per image, only
look for the tools required once.

Signed-off-by: Håkon Øye Amundsen <[email protected]>
  • Loading branch information
hakonfam committed Feb 19, 2019
1 parent dd468a3 commit 8e4dfe8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmake/app/boilerplate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ include(CheckCXXCompilerFlag)
include(${ZEPHYR_BASE}/cmake/extensions.cmake)
include(${ZEPHYR_BASE}/cmake/version.cmake) # depends on hex.cmake

#
# Find tools
#

include(${ZEPHYR_BASE}/cmake/python.cmake)
include(${ZEPHYR_BASE}/cmake/git.cmake) # depends on version.cmake
include(${ZEPHYR_BASE}/cmake/ccache.cmake)

if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
message(FATAL_ERROR "Source directory equals build directory.\
In-source builds are not supported.\
Please specify a build directory, e.g. cmake -Bbuild -H.")
endif()

if(FIRST_BOILERPLATE_EXECUTION)
#
# Find tools
#

include(${ZEPHYR_BASE}/cmake/python.cmake)
include(${ZEPHYR_BASE}/cmake/git.cmake) # depends on version.cmake
include(${ZEPHYR_BASE}/cmake/ccache.cmake)

add_custom_target(
pristine
COMMAND ${CMAKE_COMMAND} -P ${ZEPHYR_BASE}/cmake/pristine.cmake
Expand Down

0 comments on commit 8e4dfe8

Please sign in to comment.