From 013e80ed45f6d4a0eaaac9338fe5d0397ee221cf Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 18 Nov 2023 22:59:57 -0600 Subject: [PATCH 01/10] Support python stable ABI --- CMakeLists.txt | 1 + cmake/FindPython.cmake | 31 ++++++++++++++++++++++--------- setup.py | 9 +++++++++ 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 418b6704c..55278a912 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ set(CMAKE_CXX_FLAGS_DEBUG ${SYMENGINE_CXX_FLAGS_DEBUG}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYMENGINE_CXX_FLAGS}") include_directories(${SYMENGINE_INCLUDE_DIRS}) +set(WITH_PY_LIMITED_API OFF CACHE STRING "Use CPython's limited API") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") find_package(Python REQUIRED) find_package(Cython REQUIRED) diff --git a/cmake/FindPython.cmake b/cmake/FindPython.cmake index 52539cb79..b0ff460fb 100644 --- a/cmake/FindPython.cmake +++ b/cmake/FindPython.cmake @@ -38,15 +38,17 @@ message(STATUS "Python version: ${PYTHON_VERSION}") string(REPLACE "." "" PYTHON_VERSION_WITHOUT_DOTS ${PYTHON_VERSION}) if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - FIND_LIBRARY(PYTHON_LIBRARY NAMES - python${PYTHON_VERSION} - python${PYTHON_VERSION}m - python${PYTHON_VERSION_WITHOUT_DOTS} - PATHS ${PYTHON_LIB_PATH} ${PYTHON_PREFIX_PATH}/lib ${PYTHON_PREFIX_PATH}/libs - PATH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE} - NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - ) + if (WITH_PY_LIMITED_API) + set(PYTHON_LIBRARY_NAMES python3) + else() + set(PYTHON_LIBRARY_NAMES python${PYTHON_VERSION} python${PYTHON_VERSION}m python${PYTHON_VERSION_WITHOUT_DOTS}) + endif() + FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} + PATHS ${PYTHON_LIB_PATH} ${PYTHON_PREFIX_PATH}/lib ${PYTHON_PREFIX_PATH}/libs + PATH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE} + NO_DEFAULT_PATH + NO_SYSTEM_ENVIRONMENT_PATH + ) endif() execute_process( @@ -64,6 +66,12 @@ execute_process( ) string(STRIP ${PYTHON_EXTENSION_SOABI_tmp} PYTHON_EXTENSION_SOABI_tmp) +if (WITH_PY_LIMITED_API) + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + set(PYTHON_EXTENSION_SOABI_tmp ".abi3") + endif() +endif() + set(PYTHON_EXTENSION_SOABI ${PYTHON_EXTENSION_SOABI_tmp} CACHE STRING "Suffix for python extensions") @@ -130,4 +138,9 @@ macro(ADD_PYTHON_LIBRARY name) target_link_libraries(${name} ${PYTHON_LIBRARY}) set_target_properties(${name} PROPERTIES SUFFIX ".pyd") ENDIF() + IF(WITH_PY_LIMITED_API) + target_compile_definitions(${name} PRIVATE + Py_LIMITED_API=${WITH_PY_LIMITED_API} + CYTHON_LIMITED_API=1) + ENDIF() endmacro(ADD_PYTHON_LIBRARY) diff --git a/setup.py b/setup.py index 1c5e92077..6af031090 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,7 @@ def get_build_dir(dist): ('build-type=', None, 'build type: Release or Debug'), ('define=', 'D', 'options to cmake :='), + ('py-limited-api=', None, 'Use Py_LIMITED_API with given version.'), ] def _process_define(arg): @@ -91,6 +92,7 @@ def initialize_options(self): self.symengine_dir = None self.generator = None self.build_type = "Release" + self.py_limited_api = None def finalize_options(self): _build_ext.finalize_options(self) @@ -122,6 +124,13 @@ def cmake_build(self): cmake_cmd.extend(process_opts(cmake_opts)) if not path.exists(path.join(build_dir, "CMakeCache.txt")): cmake_cmd.extend(self.get_generator()) + + if self.py_limited_api: + assert self.py_limited_api.startswith("cp3") + py_ver_minor = int(self.py_limited_api[3:]) + h = 3 * 16**6 + py_ver_minor * 16**4 + cmake_cmd.append(f"-DWITH_PY_LIMITED_API={h}") + if subprocess.call(cmake_cmd, cwd=build_dir) != 0: raise OSError("error calling cmake") From c8cf7655e4d2885646d291505ad7c4535489b9f7 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 11:44:20 -0500 Subject: [PATCH 02/10] Require python>=3.11 and cython>=3.1 for limited api support --- cmake/FindCython.cmake | 18 ++++++++++++++++++ setup.py | 2 ++ 2 files changed, 20 insertions(+) diff --git a/cmake/FindCython.cmake b/cmake/FindCython.cmake index beac6c568..e35d44ba6 100644 --- a/cmake/FindCython.cmake +++ b/cmake/FindCython.cmake @@ -24,6 +24,19 @@ IF (CYTHON_BIN) else (CYTHON_RESULT EQUAL 0) SET(Cython_Compilation_Failed TRUE) endif (CYTHON_RESULT EQUAL 0) + execute_process( + COMMAND ${CYTHON_BIN} --version + RESULT_VARIABLE CYTHON_VERSION_RESULT + OUTPUT_VARIABLE CYTHON_VERSION_OUTPUT + ERROR_VARIABLE CYTHON_VERSION_ERROR + ) + if (CYTHON_VERSION_RESULT EQUAL 0) + string(STRIP ${CYTHON_VERSION_OUTPUT} CYTHON_VERSION_OUTPUT) + if ("${CYTHON_VERSION_OUTPUT}" MATCHES "Cython version") + string(SUBSTRING "${CYTHON_VERSION_OUTPUT}" 15 -1 CYTHON_VERSION) + endif () + endif () + message(STATUS "Cython version: ${CYTHON_VERSION}") ENDIF (CYTHON_BIN) @@ -31,6 +44,11 @@ IF (Cython_FOUND) IF (NOT Cython_FIND_QUIETLY) MESSAGE(STATUS "Found CYTHON: ${CYTHON_BIN}") ENDIF (NOT Cython_FIND_QUIETLY) + IF (WITH_PY_LIMITED_API AND "${CYTHON_VERSION}" VERSION_LESS "3.1") + MESSAGE(FATAL_ERROR + "Your Cython version (${CYTHON_VERSION}) is too old. Please upgrade Cython to 3.1 or newer." + ) + ENDIF () ELSE (Cython_FOUND) IF (Cython_FIND_REQUIRED) if(Cython_Compilation_Failed) diff --git a/setup.py b/setup.py index 8a0311a1e..e6a811d3d 100644 --- a/setup.py +++ b/setup.py @@ -128,6 +128,8 @@ def cmake_build(self): if self.py_limited_api: assert self.py_limited_api.startswith("cp3") py_ver_minor = int(self.py_limited_api[3:]) + if py_ver_minor < 11: + raise ValueError(f"symengine needs at least cp311 limited API support. Got {self.py_limited_api}") h = 3 * 16**6 + py_ver_minor * 16**4 cmake_cmd.append(f"-DWITH_PY_LIMITED_API={h}") From 38a309c9d6fabed9320bf283579ea0d363095368 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 13:58:26 -0500 Subject: [PATCH 03/10] update tests --- .github/workflows/ci.yml | 8 ++++ bin/install_travis.sh | 6 ++- bin/test_travis.sh | 4 ++ setup.py | 82 +++++++++++++++------------------------- 4 files changed, 48 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c176f13e1..c1a92db57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,13 @@ jobs: fail-fast: false matrix: include: + - BUILD_TYPE: Release + PYTHON_VERSION: '3.13' + BUILD_SHARED_LIBS: yes + SYMENGINE_PY_LIMITED_API: '3.11' + OS: ubuntu-22.04 + CC: gcc + - BUILD_TYPE: Debug WITH_BFD: yes PYTHON_VERSION: '3.12' @@ -197,6 +204,7 @@ jobs: MAKEFLAGS: ${{ matrix.MAKEFLAGS }} BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }} PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} + SYMENGINE_PY_LIMITED_API: ${{ matrix.SYMENGINE_PY_LIMITED_API }} - name: Deploy Documentation if: ${{ (github.ref == 'refs/heads/main' && github.repository == 'Symengine/symengine.py') || (github.ref == 'refs/heads/master' && github.repository == 'Symengine/symengine.py')}} diff --git a/bin/install_travis.sh b/bin/install_travis.sh index f63a47479..c9199843d 100644 --- a/bin/install_travis.sh +++ b/bin/install_travis.sh @@ -20,6 +20,10 @@ if [[ "${WITH_FLINT_PY}" == "yes" ]]; then export conda_pkgs="${conda_pkgs} python-flint"; # python-flint affects sympy, see e.g. sympy/sympy#26645 fi +if [[ "${SYMENGINE_PY_LIMITED_API}" != "" ]]; then + export conda_pkgs="${conda_pkgs} abi3audit" +fi + if [[ "${WITH_SAGE}" == "yes" ]]; then # This is split to avoid the 10 minute limit conda install -q sagelib=8.1 @@ -33,4 +37,4 @@ if [[ "${WITH_SYMPY}" != "no" ]]; then pip install sympy; fi -conda clean --all \ No newline at end of file +conda clean --all diff --git a/bin/test_travis.sh b/bin/test_travis.sh index d83b27db5..266120c87 100755 --- a/bin/test_travis.sh +++ b/bin/test_travis.sh @@ -14,6 +14,10 @@ cd symengine-* # Build inplace so that nosetests can be run inside source directory python3 setup.py install build_ext --inplace --symengine-dir=$our_install_dir +if [[ "${SYMENGINE_PY_LIMITED_API:-}" != "" ]]; then + python3 -m abi3audit --assume-minimum-abi3 {SYMENGINE_PY_LIMITED_API} symengine/lib/symengine_wrapper.abi3.so +fi + # Test python wrappers python3 -m pip install pytest python3 -m pytest -s -v $PWD/symengine/tests/test_*.py diff --git a/setup.py b/setup.py index e6a811d3d..230338307 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,11 @@ import subprocess import sys import platform +from setuptools import setup +from setuptools.command.install import install as _install +from setuptools.command.build_ext import build_ext as _build_ext +from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel +from setuptools.command.build import build as _build # Make sure the system has the right Python version. if sys.version_info[:2] < (3, 9): @@ -10,36 +15,17 @@ "Python %d.%d detected" % sys.version_info[:2]) sys.exit(-1) -# use setuptools by default as per the official advice at: -# packaging.python.org/en/latest/current.html#packaging-tool-recommendations -use_setuptools = True -# set the environment variable USE_DISTUTILS=True to force the use of distutils -use_distutils = getenv('USE_DISTUTILS') -if use_distutils is not None: - if use_distutils.lower() == 'true': - use_setuptools = False +def _get_limited_api(): + value = os.environ.get("SYMENGINE_PY_LIMITED_API") + if not value: + return None else: - print("Value {} for USE_DISTUTILS treated as False". - format(use_distutils)) - -if use_setuptools: - try: - from setuptools import setup - from setuptools.command.install import install as _install - from setuptools.command.build_ext import build_ext as _build_ext - except ImportError: - use_setuptools = False - else: - try: - from setuptools.command.build import build as _build - except ImportError: - from distutils.command.build import build as _build + version = tuple(map(int, value.split("."))) + if version < (3, 11): + raise ValueError(f"symengine needs at least python 3.11 limited API support. Got {value}") + return version -if not use_setuptools: - from distutils.core import setup - from distutils.command.install import install as _install - from distutils.command.build_ext import build_ext as _build_ext - from distutils.command.build import build as _build +limited_api = _get_limited_api() cmake_opts = [("PYTHON_BIN", sys.executable), ("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "yes")] @@ -92,7 +78,6 @@ def initialize_options(self): self.symengine_dir = None self.generator = None self.build_type = "Release" - self.py_limited_api = None def finalize_options(self): _build_ext.finalize_options(self) @@ -125,12 +110,8 @@ def cmake_build(self): if not path.exists(path.join(build_dir, "CMakeCache.txt")): cmake_cmd.extend(self.get_generator()) - if self.py_limited_api: - assert self.py_limited_api.startswith("cp3") - py_ver_minor = int(self.py_limited_api[3:]) - if py_ver_minor < 11: - raise ValueError(f"symengine needs at least cp311 limited API support. Got {self.py_limited_api}") - h = 3 * 16**6 + py_ver_minor * 16**4 + if limited_api: + h = limited_api[0] * 16**6 + limited_api[1] * 16**4 cmake_cmd.append(f"-DWITH_PY_LIMITED_API={h}") if subprocess.call(cmake_cmd, cwd=build_dir) != 0: @@ -206,21 +187,20 @@ def run(self): _install.run(self) self.cmake_install() +class BdistWheelWithCmake(_bdist_wheel): + def finalize_options(self): + _bdist_wheel.finalize_options(self) + self.root_is_pure = False + if limited_api: + self.py_limited_api = f"cp{"".join(str(c) for c in limited_api)}" + cmdclass={ - 'build': BuildWithCmake, - 'build_ext': BuildExtWithCmake, - 'install': InstallWithCmake, - } - -try: - from wheel.bdist_wheel import bdist_wheel - class BdistWheelWithCmake(bdist_wheel): - def finalize_options(self): - bdist_wheel.finalize_options(self) - self.root_is_pure = False - cmdclass["bdist_wheel"] = BdistWheelWithCmake -except ImportError: - pass + 'build': BuildWithCmake, + 'build_ext': BuildExtWithCmake, + 'install': InstallWithCmake, + 'bdist_wheel': BdistWheelWithCmake, +} + long_description = ''' SymEngine is a standalone fast C++ symbolic manipulation library. @@ -235,13 +215,13 @@ def finalize_options(self): setup(name="symengine", version="0.14.1", description="Python library providing wrappers to SymEngine", - setup_requires=['cython>=0.29.24', 'setuptools'], + setup_requires=['cython>=0.29.24', 'setuptools>=70.1.0'], long_description=long_description, author="SymEngine development team", author_email="symengine@googlegroups.com", license="MIT", url="https://github.com/symengine/symengine.py", - python_requires='>=3.9,<4', + python_requires=">=3.9,<4", zip_safe=False, packages=[], cmdclass = cmdclass, From 9f557106d31efd6eafdd08b54f6829327fa95732 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 14:47:46 -0500 Subject: [PATCH 04/10] reduce diff --- bin/test_travis.sh | 2 +- setup.py | 73 +++++++++++++++++++++++++++++++++------------- 2 files changed, 54 insertions(+), 21 deletions(-) diff --git a/bin/test_travis.sh b/bin/test_travis.sh index 266120c87..86e36314a 100755 --- a/bin/test_travis.sh +++ b/bin/test_travis.sh @@ -15,7 +15,7 @@ cd symengine-* python3 setup.py install build_ext --inplace --symengine-dir=$our_install_dir if [[ "${SYMENGINE_PY_LIMITED_API:-}" != "" ]]; then - python3 -m abi3audit --assume-minimum-abi3 {SYMENGINE_PY_LIMITED_API} symengine/lib/symengine_wrapper.abi3.so + python3 -m abi3audit --assume-minimum-abi3 ${SYMENGINE_PY_LIMITED_API} symengine/lib/symengine_wrapper.abi3.so fi # Test python wrappers diff --git a/setup.py b/setup.py index 230338307..b0eb0206c 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,6 @@ import subprocess import sys import platform -from setuptools import setup -from setuptools.command.install import install as _install -from setuptools.command.build_ext import build_ext as _build_ext -from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel -from setuptools.command.build import build as _build # Make sure the system has the right Python version. if sys.version_info[:2] < (3, 9): @@ -27,6 +22,37 @@ def _get_limited_api(): limited_api = _get_limited_api() +# use setuptools by default as per the official advice at: +# packaging.python.org/en/latest/current.html#packaging-tool-recommendations +use_setuptools = True +# set the environment variable USE_DISTUTILS=True to force the use of distutils +use_distutils = getenv('USE_DISTUTILS') +if use_distutils is not None: + if use_distutils.lower() == 'true': + use_setuptools = False + else: + print("Value {} for USE_DISTUTILS treated as False". + format(use_distutils)) + +if use_setuptools: + try: + from setuptools import setup + from setuptools.command.install import install as _install + from setuptools.command.build_ext import build_ext as _build_ext + except ImportError: + use_setuptools = False + else: + try: + from setuptools.command.build import build as _build + except ImportError: + from distutils.command.build import build as _build + +if not use_setuptools: + from distutils.core import setup + from distutils.command.install import install as _install + from distutils.command.build_ext import build_ext as _build_ext + from distutils.command.build import build as _build + cmake_opts = [("PYTHON_BIN", sys.executable), ("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "yes")] cmake_generator = [None] @@ -187,20 +213,27 @@ def run(self): _install.run(self) self.cmake_install() -class BdistWheelWithCmake(_bdist_wheel): - def finalize_options(self): - _bdist_wheel.finalize_options(self) - self.root_is_pure = False - if limited_api: - self.py_limited_api = f"cp{"".join(str(c) for c in limited_api)}" - cmdclass={ - 'build': BuildWithCmake, - 'build_ext': BuildExtWithCmake, - 'install': InstallWithCmake, - 'bdist_wheel': BdistWheelWithCmake, -} - + 'build': BuildWithCmake, + 'build_ext': BuildExtWithCmake, + 'install': InstallWithCmake, + } + +try: + try: + from setuptools.command.bdist_wheel import bdist_wheel + except ImportError: + from wheel.bdist_wheel import bdist_wheel + + class BdistWheelWithCmake(bdist_wheel): + def finalize_options(self): + bdist_wheel.finalize_options(self) + self.root_is_pure = False + if limited_api: + self.py_limited_api = "cp" + "".join(str(c) for c in limited_api) + cmdclass["bdist_wheel"] = BdistWheelWithCmake +except ImportError: + pass long_description = ''' SymEngine is a standalone fast C++ symbolic manipulation library. @@ -215,13 +248,13 @@ def finalize_options(self): setup(name="symengine", version="0.14.1", description="Python library providing wrappers to SymEngine", - setup_requires=['cython>=0.29.24', 'setuptools>=70.1.0'], + setup_requires=['cython>=0.29.24', 'setuptools'], long_description=long_description, author="SymEngine development team", author_email="symengine@googlegroups.com", license="MIT", url="https://github.com/symengine/symengine.py", - python_requires=">=3.9,<4", + python_requires='>=3.9,<4', zip_safe=False, packages=[], cmdclass = cmdclass, From 81c77d7c2471530f457ed9e7b91f2e2de43760af Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 14:51:12 -0500 Subject: [PATCH 05/10] fix SOABI on windows --- cmake/FindPython.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/FindPython.cmake b/cmake/FindPython.cmake index e8d05fe53..7ed8287f8 100644 --- a/cmake/FindPython.cmake +++ b/cmake/FindPython.cmake @@ -77,7 +77,9 @@ execute_process( string(STRIP ${PYTHON_EXTENSION_SOABI_tmp} PYTHON_EXTENSION_SOABI_tmp) if (WITH_PY_LIMITED_API) - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + set(PYTHON_EXTENSION_SOABI_tmp "") + else() set(PYTHON_EXTENSION_SOABI_tmp ".abi3") endif() endif() @@ -152,8 +154,11 @@ macro(ADD_PYTHON_LIBRARY name) ENDIF() ENDIF() IF(WITH_PY_LIMITED_API) - target_compile_definitions(${name} PRIVATE - Py_LIMITED_API=${WITH_PY_LIMITED_API} - CYTHON_LIMITED_API=1) + target_compile_definitions( + ${name} + PRIVATE + Py_LIMITED_API=${WITH_PY_LIMITED_API} + CYTHON_LIMITED_API=1 + ) ENDIF() endmacro(ADD_PYTHON_LIBRARY) From 8bb52d72949b75b2cfd0d1f3255debb6017ee523 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 14:52:14 -0500 Subject: [PATCH 06/10] verbose --- bin/test_travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/test_travis.sh b/bin/test_travis.sh index 86e36314a..fe579cdc7 100755 --- a/bin/test_travis.sh +++ b/bin/test_travis.sh @@ -15,7 +15,7 @@ cd symengine-* python3 setup.py install build_ext --inplace --symengine-dir=$our_install_dir if [[ "${SYMENGINE_PY_LIMITED_API:-}" != "" ]]; then - python3 -m abi3audit --assume-minimum-abi3 ${SYMENGINE_PY_LIMITED_API} symengine/lib/symengine_wrapper.abi3.so + python3 -m abi3audit --assume-minimum-abi3 ${SYMENGINE_PY_LIMITED_API} symengine/lib/symengine_wrapper.abi3.so -v fi # Test python wrappers From adbe5356fa3f69fab801d68d1565a0451a114c99 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 15:11:19 -0500 Subject: [PATCH 07/10] v142 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index ce1c487ce..8501023ad 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ image: "Visual Studio 2019" environment: global: - PLATFORMTOOLSET: "v140" + PLATFORMTOOLSET: "v142" matrix: - BUILD_TYPE: "Release" From 94d3f304d7477c2fccce06170b90121755730bd7 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 15:15:01 -0500 Subject: [PATCH 08/10] cmake gen --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8501023ad..33f2879bc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -107,8 +107,8 @@ install: - mkdir build - cd build -- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[Win32] set "CMAKE_GENERATOR=Visual Studio 14 2015" -- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[x64] set "CMAKE_GENERATOR=Visual Studio 14 2015 Win64" +- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[Win32] set "CMAKE_GENERATOR=Visual Studio 14 2019" +- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[x64] set "CMAKE_GENERATOR=Visual Studio 14 2019 Win64" - if [%COMPILER%]==[MinGW] set "CMAKE_GENERATOR=MinGW Makefiles" - if [%COMPILER%]==[MinGW-w64] set "CMAKE_GENERATOR=MinGW Makefiles" From 89917562e8d8a4d89ec184d653a4e994ea1fe348 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 15:21:07 -0500 Subject: [PATCH 09/10] add generator platform --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 33f2879bc..3220d933c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -107,8 +107,8 @@ install: - mkdir build - cd build -- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[Win32] set "CMAKE_GENERATOR=Visual Studio 14 2019" -- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[x64] set "CMAKE_GENERATOR=Visual Studio 14 2019 Win64" +- if [%COMPILER%]==[MSVC15] set "CMAKE_GENERATOR=Visual Studio 14 2019" +- if [%COMPILER%]==[MSVC15] set "CMAKE_GENERATOR_PLATFORM=%PLATFORM%" - if [%COMPILER%]==[MinGW] set "CMAKE_GENERATOR=MinGW Makefiles" - if [%COMPILER%]==[MinGW-w64] set "CMAKE_GENERATOR=MinGW Makefiles" From b6894c920c95e2cd91a7f4d235cfc083eb9b6bdd Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 13 Sep 2025 15:27:55 -0500 Subject: [PATCH 10/10] fix typo --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3220d933c..52e44eb57 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -107,7 +107,7 @@ install: - mkdir build - cd build -- if [%COMPILER%]==[MSVC15] set "CMAKE_GENERATOR=Visual Studio 14 2019" +- if [%COMPILER%]==[MSVC15] set "CMAKE_GENERATOR=Visual Studio 16 2019" - if [%COMPILER%]==[MSVC15] set "CMAKE_GENERATOR_PLATFORM=%PLATFORM%" - if [%COMPILER%]==[MinGW] set "CMAKE_GENERATOR=MinGW Makefiles" - if [%COMPILER%]==[MinGW-w64] set "CMAKE_GENERATOR=MinGW Makefiles"