diff --git a/build_dotnet_win_x64_arm64.bat b/build_dotnet_win_x64_arm64.bat new file mode 100644 index 0000000000..ba720262a8 --- /dev/null +++ b/build_dotnet_win_x64_arm64.bat @@ -0,0 +1,18 @@ +@echo off + +if %PROCESSOR_ARCHITECTURE%==AMD64 ( +echo "build on x64" +cmake -S . -B build_x64 -DBUILD_DEPS=ON -DBUILD_DOTNET=ON +cmake --build build_x64 --config Release --target ALL_BUILD -j -v +cmake -A ARM64 -S . -B build_arm64 -DBUILD_DEPS=ON -DBUILD_DOTNET=ON -DOR_TOOLS_PROTOC_EXECUTABLE=..\build_x64\Release\bin\protoc.exe +cmake --build build_arm64 --config Release --target ALL_BUILD -j -v +) + +if %PROCESSOR_ARCHITECTURE%==ARM64 ( +echo "build on arm64" +cmake -S . -B build_arm64 -DBUILD_DEPS=ON -DBUILD_DOTNET=ON +cmake --build build_arm64 --config Release --target ALL_BUILD -j -v +cmake -A x64 -S . -B build_x64 -DBUILD_DEPS=ON -DBUILD_DOTNET=ON -DOR_TOOLS_PROTOC_EXECUTABLE=..\build_arm64\Release\bin\protoc.exe +cmake --build build_x64 --config Release --target ALL_BUILD -j -v +) + diff --git a/cmake/dotnet.cmake b/cmake/dotnet.cmake index d1d7f042e2..0c3d2f6f22 100644 --- a/cmake/dotnet.cmake +++ b/cmake/dotnet.cmake @@ -48,12 +48,18 @@ set(DOTNET_PACKAGES_DIR "${PROJECT_BINARY_DIR}/dotnet/packages") # Runtime IDentifier # see: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)") +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|ARM64)") set(DOTNET_PLATFORM arm64) else() set(DOTNET_PLATFORM x64) endif() +if (CMAKE_GENERATOR_PLATFORM MATCHES "^(aarch64|arm64|ARM64)") + set(DOTNET_PLATFORM arm64) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^(X64|x64)") + set(DOTNET_PLATFORM x64) +endif() + if(APPLE) set(DOTNET_RID osx-${DOTNET_PLATFORM}) elseif(UNIX) diff --git a/ortools/dotnet/Google.OrTools-full.csproj.in b/ortools/dotnet/Google.OrTools-full.csproj.in index d43465843d..0abaaa95d1 100644 --- a/ortools/dotnet/Google.OrTools-full.csproj.in +++ b/ortools/dotnet/Google.OrTools-full.csproj.in @@ -3,7 +3,7 @@ Library @DOTNET_LANG@ @DOTNET_TFM@ - linux-x64;osx-x64;win-x64;linux-arm64;osx-arm64 + linux-x64;osx-x64;win-x64;win-arm64;linux-arm64;osx-arm64 true @DOTNET_PROJECT@ @PROJECT_VERSION@@DOTNET_RELEASE@ @@ -116,6 +116,7 @@ + @@ -126,11 +127,13 @@ + + - + diff --git a/ortools/dotnet/Google.OrTools.sln b/ortools/dotnet/Google.OrTools.sln index d906c3e4ec..083580253d 100644 --- a/ortools/dotnet/Google.OrTools.sln +++ b/ortools/dotnet/Google.OrTools.sln @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 15.0.26124.0 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.OrTools.runtime.linux-x64", "Google.OrTools.runtime.linux-x64\Google.OrTools.runtime.linux-x64.csproj", "{FC646C34-8541-427D-B9F6-1247798F4574}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.OrTools.runtime.osx-x64", "Google.OrTools.runtime.osx-x64\Google.OrTools.runtime.osx-x64.csproj", "{FC646C34-8541-427D-B9F6-1247798F4574}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.OrTools.runtime.win-x64", "Google.OrTools.runtime.win-x64\Google.OrTools.runtime.win-x64.csproj", "{FC646C34-8541-427D-B9F6-1247798F4574}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.OrTools.runtime.win-arm64", "Google.OrTools.runtime.win-arm64\Google.OrTools.runtime.win-arm64.csproj", "{FC646C34-8541-427D-B9F6-1247798F4574}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.OrTools", "Google.OrTools\Google.OrTools.csproj", "{FC646C34-8541-427D-B9F6-1247798F4574}" EndProject Global diff --git a/patches/scip-v10.0.0.patch b/patches/scip-v10.0.0.patch index dbb1531015..337d2bcf12 100644 --- a/patches/scip-v10.0.0.patch +++ b/patches/scip-v10.0.0.patch @@ -107,3 +107,17 @@ index c6ce7283..6b6b1fc8 100644 install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/scip-config.cmake" ${PROJECT_BINARY_DIR}/scip-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/scip) +diff --git a/src/scip/intervalarith.c b/src/scip/intervalarith.c +index 6d76d12e..7a0b0204 100644 +--- a/src/scip/intervalarith.c ++++ b/src/scip/intervalarith.c +@@ -301,7 +301,7 @@ double negate( + /* cl or icl compiler on 32bit windows or icl compiler on 64bit windows + * cl on 64bit windows does not seem to support inline assembler + */ +-#elif defined(_MSC_VER) && (defined(__INTEL_COMPILER) || !defined(_M_X64)) ++#elif defined(_MSC_VER) && (defined(__INTEL_COMPILER) || (!defined(_M_X64) && !defined(_M_ARM64))) + + /** gets the negation of a double + * Do this in a way that the compiler does not "optimize" it away, which usually does not considers rounding modes. + \ No newline at end of file