@@ -173,13 +173,13 @@ def compile_rgf():
173173 target = os .path .join (rgf_base_dir , 'bin' , 'rgf.exe' )
174174 logger .info ("Trying to build executable file with MSBuild "
175175 "from existing Visual Studio solution." )
176+ if IS_64BITS :
177+ arch = 'x64'
178+ else :
179+ arch = 'Win32'
176180 platform_toolsets = ('Windows7.1SDK' , 'v100' , 'v110' ,
177- 'v120' , 'v140' , 'v141' )
181+ 'v120' , 'v140' , 'v141' , 'v142' )
178182 for platform_toolset in platform_toolsets :
179- if IS_64BITS :
180- arch = 'x64'
181- else :
182- arch = 'Win32'
183183 success = silent_call (('MSBuild' ,
184184 'rgf.sln' ,
185185 '/p:Configuration=Release' ,
@@ -201,12 +201,10 @@ def compile_rgf():
201201 logger .info ("Trying to build executable file with CMake and MSBuild." )
202202 generators = ('Visual Studio 10 2010' , 'Visual Studio 11 2012' ,
203203 'Visual Studio 12 2013' , 'Visual Studio 14 2015' ,
204- 'Visual Studio 15 2017' )
204+ 'Visual Studio 15 2017' , 'Visual Studio 16 2019' )
205205 for generator in generators :
206- if IS_64BITS :
207- generator += ' Win64'
208206 clear_folder (os .path .join (rgf_base_dir , 'build' ))
209- success = silent_call (('cmake' , '../' , '-G' , generator ))
207+ success = silent_call (('cmake' , '../' , '-G' , generator , '-A' , arch ))
210208 success &= silent_call (('cmake' , '--build' , '.' , '--config' , 'Release' ))
211209 if success and os .path .isfile (target ) and is_rgf_response (target ):
212210 break
0 commit comments