Skip to content
Browse files

west: build: use CMAKE_HOME_DIRECTORY to locate source

Rather than relying on APPLICATION_SOURCE_DIR to be in the cache, just

Signed-off-by: Marti Bolivar <>
  • Loading branch information...
mbolivar authored and nashif committed Apr 10, 2019
1 parent 4dbf5f1 commit acda25716a008522c71e45d4bf15934fbf0ddb44
Showing with 6 additions and 6 deletions.
  1. +6 −6 scripts/west_commands/
@@ -250,13 +250,13 @@ def _setup_source_dir(self):
if self.args.source_dir:
source_dir = self.args.source_dir
elif self.cmake_cache:
source_dir = self.cmake_cache.get('APPLICATION_SOURCE_DIR')
source_dir = self.cmake_cache.get('CMAKE_HOME_DIRECTORY')
if not source_dir:
# Maybe Zephyr changed the key? Give the user a way
# to retry, at least.
log.die("can't determine application from build directory "
"{}, please specify an application to build".
# This really ought to be there. The build directory
# must be corrupted somehow. Let's see what we can do.
log.die('build directory', self.build_dir,
'CMake cache has no CMAKE_HOME_DIRECTORY;',
'please give a source_dir')
source_dir = os.getcwd()
self.source_dir = os.path.abspath(source_dir)

0 comments on commit acda257

Please sign in to comment.
You can’t perform that action at this time.