Auto build dll exports failing (VS 2015 update 2)
I think this is related to #16161 (closed) but I'm not sure.
I am using CMake 3.9.4, which should definitely include the fix from that 16161 issue. I have verified that source change in https://gitlab.kitware.com/cmake/cmake/blob/v3.9.4/Source/bindexplib.cxx#L193
I still seem to be seeing that same issue, though. I'm trying to build freetype 2.8.1. Here's my build script:
:: Configure.
cmake -G "Visual Studio 14 2015 Win64" ^
-D CMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-D CMAKE_BUILD_TYPE=Release ^
-D CMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-D CMAKE_SYSTEM_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-D BUILD_SHARED_LIBS:BOOL=true ^
"%SRC_DIR%"
if errorlevel 1 exit 1
:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1
:: Test.
ctest -C Release
if errorlevel 1 exit 1
:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1
This dies on Windows with VS2015 at the PreLink event:
PreLinkEvent:
Description: Auto build dll exports
setlocal
cd C:\Miniconda3\conda-bld\freetype_1510256120553\work\build
if %errorlevel% neq 0 goto :cmEnd
C:\Miniconda3\conda-bld\freetype_1510256120553\_h_env\Library\bin\cmake.exe -E __create_def C:/Miniconda3/conda-bld/f
reetype_1510256120553/work/build/freetype.dir/Release/exports.def C:/Miniconda3/conda-bld/freetype_1510256120553/work
/build/freetype.dir/Release//objects.txt
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: The command "
setlocal\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: cd C:\Minicon
da3\conda-bld\freetype_1510256120553\work\build\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.v
cxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: if %errorleve
l% neq 0 goto :cmEnd\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: C:\Miniconda3
\conda-bld\freetype_1510256120553\_h_env\Library\bin\cmake.exe -E __create_def C:/Miniconda3/conda-bld/freetype_1510256
120553/work/build/freetype.dir/Release/exports.def C:/Miniconda3/conda-bld/freetype_1510256120553/work/build/freetype.d
ir/Release//objects.txt\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: if %errorleve
l% neq 0 goto :cmEnd\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: :cmEnd\r [C:\
Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: endlocal & ca
ll :cmErrorLevel %errorlevel% & goto :cmDone\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxp
roj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: :cmErrorLevel
\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: exit /b %1\r
[C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: :cmDone\r [C:
\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: if %errorleve
l% neq 0 goto :VCEnd\r [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(128,5): error MSB3073: :VCEnd" exite
d with code -1073741819. [C:\Miniconda3\conda-bld\freetype_1510256120553\work\build\freetype.vcxproj]
Is there any other information I can provide that would be helpful?