Skip to content

Commit 8e4dfe8

Browse files
committed
cmake: look for tools in first invocation only
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]>
1 parent dd468a3 commit 8e4dfe8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cmake/app/boilerplate.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,21 @@ include(CheckCXXCompilerFlag)
125125
include(${ZEPHYR_BASE}/cmake/extensions.cmake)
126126
include(${ZEPHYR_BASE}/cmake/version.cmake) # depends on hex.cmake
127127

128-
#
129-
# Find tools
130-
#
131-
132-
include(${ZEPHYR_BASE}/cmake/python.cmake)
133-
include(${ZEPHYR_BASE}/cmake/git.cmake) # depends on version.cmake
134-
include(${ZEPHYR_BASE}/cmake/ccache.cmake)
135-
136128
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
137129
message(FATAL_ERROR "Source directory equals build directory.\
138130
In-source builds are not supported.\
139131
Please specify a build directory, e.g. cmake -Bbuild -H.")
140132
endif()
141133

142134
if(FIRST_BOILERPLATE_EXECUTION)
135+
#
136+
# Find tools
137+
#
138+
139+
include(${ZEPHYR_BASE}/cmake/python.cmake)
140+
include(${ZEPHYR_BASE}/cmake/git.cmake) # depends on version.cmake
141+
include(${ZEPHYR_BASE}/cmake/ccache.cmake)
142+
143143
add_custom_target(
144144
pristine
145145
COMMAND ${CMAKE_COMMAND} -P ${ZEPHYR_BASE}/cmake/pristine.cmake

0 commit comments

Comments
 (0)