]> granicus.if.org Git - libevent/commitdiff
test-export: compatible with all versions of visual studio
authoryuangongji <yuangongji@foxmail.com>
Mon, 20 Jan 2020 13:15:26 +0000 (21:15 +0800)
committerAzat Khuzhin <azat@libevent.org>
Fri, 24 Jan 2020 04:52:06 +0000 (07:52 +0300)
test-export/test-export.py

index 3be8193f6e61e5d7dfebd8a3923e99a94ade7eaf..d71e5dbaa194c0ceb4abf1ec9f0eefeb5f238114 100644 (file)
@@ -48,11 +48,11 @@ def link_and_run(link, code):
         Returns 0 if links and runs successfully, otherwise 1.
     """
     exec_cmd("cmake --build . --target clean", True)
-    generator = ''
+    arch = ''
     if platform.system() == "Windows":
-        generator = '-G "Visual Studio 15 2017 Win64"'
+        arch = '-A x64'
     cmd = 'cmake .. %s -DEVENT__LINK_COMPONENT=%s -DEVENT__CODE_COMPONENT=%s' % (
-        generator, link, code)
+        arch, link, code)
     if link_type == "static":
         cmd = "".join([cmd, " -DLIBEVENT_STATIC_LINK=1"])
     r = exec_cmd(cmd, True)