diff options
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.py b/configure.py index 28ff855..51371f6 100755 --- a/configure.py +++ b/configure.py @@ -305,9 +305,18 @@ if platform.is_msvc(): else: n.variable('ar', configure_env.get('AR', 'ar')) +def search_system_path(file_name): + """Find a file in the system path.""" + for dir in os.environ['path'].split(';'): + path = os.path.join(dir, file_name) + if os.path.exists(path): + return path + # Note that build settings are separately specified in CMakeLists.txt and # these lists should be kept in sync. if platform.is_msvc(): + if not search_system_path('cl.exe'): + raise Exception('cl.exe not found. Run again from the Developer Command Prompt for VS') cflags = ['/showIncludes', '/nologo', # Don't print startup banner. '/Zi', # Create pdb with debug info. |