Windows fix (#333)

* Fix cmake detection in msys

* Revert windows change

* Update to unix line endings
master
Adam Gibson 2020-03-20 12:14:03 +09:00 committed by GitHub
parent 0cf4a45573
commit 30a28fae45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 35 deletions

View File

@ -181,8 +181,6 @@ if [ "$(uname)" == "Darwin" ]; then
elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ] || [ "$(expr substr $(uname -s) 1 4)" == "MSYS" ]; then elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ] || [ "$(expr substr $(uname -s) 1 4)" == "MSYS" ]; then
HOST="windows" HOST="windows"
KERNEL="windows-x86_64" KERNEL="windows-x86_64"
# need to set build path separator, it ends up being wrong on msys2
BUILD_PATH_SEPARATOR=";"
echo "Running windows" echo "Running windows"
elif [ "$(uname -m)" == "ppc64le" ]; then elif [ "$(uname -m)" == "ppc64le" ]; then
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
@ -195,9 +193,9 @@ if [ -z "$OS" ]; then
OS="$HOST" OS="$HOST"
fi fi
if [[ -z ${ANDROID_NDK:-} ]]; then
export ANDROID_NDK=$HOME/Android/android-ndk/
echo "RUNNING BUILD FOR OS $OS" fi
case "$OS" in case "$OS" in
linux-armhf) linux-armhf)
@ -251,11 +249,8 @@ case "$OS" in
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
ARCH="i686" ARCH="i686"
fi fi
echo "BUILDING ANDROID x86"
setandroid_defaults setandroid_defaults
export ANDROID_BIN="$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/$KERNEL/" export ANDROID_BIN="$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/$KERNEL/"
export ANDROID_CPP="$ANDROID_NDK/sources/cxx-stl/llvm-libc++/" export ANDROID_CPP="$ANDROID_NDK/sources/cxx-stl/llvm-libc++/"
export ANDROID_CC="$ANDROID_NDK/toolchains/llvm/prebuilt/$KERNEL/bin/clang" export ANDROID_CC="$ANDROID_NDK/toolchains/llvm/prebuilt/$KERNEL/bin/clang"
@ -364,7 +359,6 @@ case "$OS" in
PARALLEL="true" PARALLEL="true"
VERBOSE_ARG="-v" VERBOSE_ARG="-v"
else else
echo "SETTING UP WINDOWS"
export CMAKE_COMMAND="cmake -G \"MSYS Makefiles\"" export CMAKE_COMMAND="cmake -G \"MSYS Makefiles\""
export MAKE_COMMAND="make" export MAKE_COMMAND="make"
export CC=/mingw64/bin/gcc export CC=/mingw64/bin/gcc
@ -524,7 +518,6 @@ OPENBLAS_PATH="${OPENBLAS_PATH//\\//}"
if [[ -n "${BUILD_PATH:-}" ]]; then if [[ -n "${BUILD_PATH:-}" ]]; then
PREVIFS="$IFS" PREVIFS="$IFS"
IFS="$BUILD_PATH_SEPARATOR" IFS="$BUILD_PATH_SEPARATOR"
echo "BUILD PATH BUILD_PATH_SEPARATOR IS $BUILD_PATH_SEPARATOR"
for P in $BUILD_PATH; do for P in $BUILD_PATH; do
if [[ -f "$P/include/openblas_config.h" ]]; then if [[ -f "$P/include/openblas_config.h" ]]; then
OPENBLAS_PATH="$P" OPENBLAS_PATH="$P"
@ -541,7 +534,6 @@ fi
# replace any backslash with a slash # replace any backslash with a slash
OPENBLAS_PATH="${OPENBLAS_PATH//\\//}" OPENBLAS_PATH="${OPENBLAS_PATH//\\//}"
mkbuilddir() { mkbuilddir() {
if [ "$CLEAN" == "true" ]; then if [ "$CLEAN" == "true" ]; then
echo "Removing blasbuild" echo "Removing blasbuild"

View File

@ -287,6 +287,25 @@
<javacpp.platform.extension>-avx512</javacpp.platform.extension> <javacpp.platform.extension>-avx512</javacpp.platform.extension>
</properties> </properties>
</profile> </profile>
<profile>
<id>mingw</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<configuration>
<properties>${javacpp.platform}-mingw</properties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile> <profile>
<id>libnd4j-assembly</id> <id>libnd4j-assembly</id>