Build: Make setting GNUARM_PATH explicitly work
If GNUARM_PATH is explicitly set, we should search only in that path
(thus adding NO_DEFAULT_PATH to find_program).
Also since we explict GNUARM_PATH to be
${GNUARM_PATH}/bin/${_GCC_BINARY_NAME} setup find_program to append bin/
for us. Otherwise we get into issues with GNUARM_PATH being set one way
by the user and another bin FindGNUARM.cmake.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Change-Id: I95ffb8a48088a6c114676c8b1b320a127965c026
diff --git a/cmake/Common/FindGNUARM.cmake b/cmake/Common/FindGNUARM.cmake
index 274bbc1..5454c68 100644
--- a/cmake/Common/FindGNUARM.cmake
+++ b/cmake/Common/FindGNUARM.cmake
@@ -108,7 +108,7 @@
find_program (
_GNUARM_PATH
${_GCC_BINARY_NAME}
- PATHS ${GNUARM_PATH}
+ PATHS ${GNUARM_PATH}/bin NO_DEFAULT_PATH
DOC "GNUARM compiler location."
)
endif()