add cmake generator option

pull/12264/head
Jan Tattermusch 8 years ago
parent 91eeb79e52
commit ec3338dc9d
  1. 5
      tools/run_tests/helper_scripts/pre_build_cmake.bat
  2. 7
      tools/run_tests/run_tests.py

@ -14,7 +14,8 @@
setlocal
set ARCHITECTURE=%1
set GENERATOR=%1
set ARCHITECTURE=%2
cd /d %~dp0\..\..\..
@ -27,7 +28,7 @@ cd build
@rem If yasm is not on the path, use hardcoded path instead.
yasm --version || set USE_HARDCODED_YASM_PATH_MAYBE=-DCMAKE_ASM_NASM_COMPILER="C:/Program Files (x86)/yasm/yasm.exe"
cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=ON %USE_HARDCODED_YASM_PATH_MAYBE% ../.. || goto :error
cmake -G "%GENERATOR%" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=ON %USE_HARDCODED_YASM_PATH_MAYBE% ../.. || goto :error
endlocal

@ -237,6 +237,7 @@ class CLanguage(object):
if self.platform == 'windows':
_check_compiler(self.args.compiler, ['default', 'cmake'])
_check_arch(self.args.arch, ['default', 'x64', 'x86'])
self._cmake_generator_option = 'Visual Studio 14 2015'
self._cmake_arch_option = 'x64' if self.args.arch == 'x64' else 'Win32'
self._use_cmake = True
self._make_options = []
@ -363,11 +364,13 @@ class CLanguage(object):
'check_epollexclusive']
def make_options(self):
return self._make_options;
return self._make_options
def pre_build_steps(self):
if self.platform == 'windows':
return [['tools\\run_tests\\helper_scripts\\pre_build_cmake.bat', self._cmake_arch_option]]
return [['tools\\run_tests\\helper_scripts\\pre_build_cmake.bat',
self._cmake_generator_option,
self._cmake_arch_option]]
elif self._use_cmake:
return [['tools/run_tests/helper_scripts/pre_build_cmake.sh']]
else:

Loading…
Cancel
Save