From b97265ff6e682fb24645be72d7f90bf90b4c88d6 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 26 Sep 2024 14:32:08 +0100 Subject: [PATCH] build/win: nmake generator & auto toolset - reverts #1928 --- .github/workflows/build.yml | 2 ++ recipe/bld.bat | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20fbc02366..e7c00f2506 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,6 +56,8 @@ jobs: python-version: ${{ matrix.python-version }} mamba-version: "1.5" channels: conda-forge + - if: matrix.os == 'windows' + uses: ilammy/msvc-dev-cmd@v1 - name: conda build & test working-directory: recipe run: | diff --git a/recipe/bld.bat b/recipe/bld.bat index 12d32b5494..4fa235b85d 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -5,10 +5,7 @@ if not "%GIT_DESCRIBE_NUMBER%"=="0" ( set SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CIL=%PKG_VERSION%.dev%GIT_DESCRIBE_NUMBER%+%GIT_DESCRIBE_HASH% ) -:: -G "Visual Studio 16 2019" specifies the the generator -:: -T v142 specifies the toolset - -cmake -S "%RECIPE_DIR%\.." -B "%SRC_DIR%\build_framework" -G "Visual Studio 16 2019" -T "v142" -DCONDA_BUILD=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBRARY_LIB=%CONDA_PREFIX%\lib -DLIBRARY_INC=%CONDA_PREFIX% -DCMAKE_INSTALL_PREFIX=%PREFIX% +cmake -S "%RECIPE_DIR%\.." -B "%SRC_DIR%\build_framework" -G "NMake Makefiles" -DCONDA_BUILD=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBRARY_LIB=%CONDA_PREFIX%\lib -DLIBRARY_INC=%CONDA_PREFIX% -DCMAKE_INSTALL_PREFIX=%PREFIX% if errorlevel 1 exit 1 cmake --build "%SRC_DIR%\build_framework" --target install --config RelWithDebInfo