cmake: propagating zephyr base to west

West utilizes Zephyr base when invoked out-of-tree in order to determine
west topdir.

This commit ensures that zephyr base when invoking west from CMake is
set to current zephyr base.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
diff --git a/scripts/zephyr_module.py b/scripts/zephyr_module.py
index af28ebb..ad1864a 100755
--- a/scripts/zephyr_module.py
+++ b/scripts/zephyr_module.py
@@ -178,10 +178,13 @@
                         help='List of extra modules to parse')
     parser.add_argument('-w', '--west-path', default='west',
                         help='Path to west executable')
+    parser.add_argument('-z', '--zephyr-base',
+                        help='Path to zephyr repository')
     args = parser.parse_args()
 
     if args.modules is None:
         p = subprocess.Popen([args.west_path, 'list', '--format={posixpath}'],
+                             cwd=args.zephyr_base,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
         out, err = p.communicate()