Skip to content

Commit c2136f7

Browse files
mingwandroidocefpaf
authored andcommitted
Use the default cmake generator (Visual Studio)
Build files created by the nmake generator do not link to the UCRT. This was the cause of ContinuumIO/anaconda-issues#6535
1 parent 085c547 commit c2136f7

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

recipe/bld.bat

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
1-
mkdir build
2-
cd build
1+
mkdir build-%SUBDIR%-%c_compiler%
2+
cd build-%SUBDIR%-%c_compiler%
33

44
:: Configure.
5-
cmake -G "NMake Makefiles" ^
6-
-D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
7-
-D ZLIB_LIBRARY=%LIBRARY_LIB%\zlib.lib ^
8-
-D ZLIB_INCLUDE_DIR=%LIBRARY_INC% ^
9-
-D CMAKE_BUILD_TYPE=Release ^
10-
%SRC_DIR%
11-
if errorlevel 1 exit 1
5+
cmake -G "%CMAKE_GENERATOR%" ^
6+
-D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
7+
-D ZLIB_LIBRARY=%LIBRARY_LIB%\zlib.lib ^
8+
-D ZLIB_INCLUDE_DIR=%LIBRARY_INC% ^
9+
-DCMAKE_C_FLAGS="%CFLAGS% -DWIN32" ^
10+
..
11+
if errorlevel 1 exit /b 1
1212

13-
:: Build.
14-
nmake
15-
if errorlevel 1 exit 1
13+
cmake --build . --target install --config Release
14+
if errorlevel 1 exit /b 1
1615

1716
:: Test.
18-
ctest
19-
if errorlevel 1 exit 1
20-
21-
:: Install.
22-
nmake install
17+
ctest -C Release
2318
if errorlevel 1 exit 1
2419

2520
:: Make copies of the .lib files without the embedded version number.

recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source:
99
sha256: 574623a4901a9969080ab4a2df9437026c8a87150dfd5c235e28c94b212964a7
1010

1111
build:
12-
number: 2
12+
number: 3
1313
features:
1414
- vc{{ vc }} # [win]
1515
run_exports:

0 commit comments

Comments
 (0)