Windows fix (#333)
* Fix cmake detection in msys * Revert windows change * Update to unix line endingsmaster
parent
0cf4a45573
commit
30a28fae45
|
@ -181,8 +181,6 @@ if [ "$(uname)" == "Darwin" ]; then
|
|||
elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ] || [ "$(expr substr $(uname -s) 1 4)" == "MSYS" ]; then
|
||||
HOST="windows"
|
||||
KERNEL="windows-x86_64"
|
||||
# need to set build path separator, it ends up being wrong on msys2
|
||||
BUILD_PATH_SEPARATOR=";"
|
||||
echo "Running windows"
|
||||
elif [ "$(uname -m)" == "ppc64le" ]; then
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
@ -195,9 +193,9 @@ if [ -z "$OS" ]; then
|
|||
OS="$HOST"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "RUNNING BUILD FOR OS $OS"
|
||||
if [[ -z ${ANDROID_NDK:-} ]]; then
|
||||
export ANDROID_NDK=$HOME/Android/android-ndk/
|
||||
fi
|
||||
|
||||
case "$OS" in
|
||||
linux-armhf)
|
||||
|
@ -251,11 +249,8 @@ case "$OS" in
|
|||
if [ -z "$ARCH" ]; then
|
||||
ARCH="i686"
|
||||
fi
|
||||
echo "BUILDING ANDROID x86"
|
||||
|
||||
setandroid_defaults
|
||||
|
||||
|
||||
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_CC="$ANDROID_NDK/toolchains/llvm/prebuilt/$KERNEL/bin/clang"
|
||||
|
@ -364,7 +359,6 @@ case "$OS" in
|
|||
PARALLEL="true"
|
||||
VERBOSE_ARG="-v"
|
||||
else
|
||||
echo "SETTING UP WINDOWS"
|
||||
export CMAKE_COMMAND="cmake -G \"MSYS Makefiles\""
|
||||
export MAKE_COMMAND="make"
|
||||
export CC=/mingw64/bin/gcc
|
||||
|
@ -524,7 +518,6 @@ OPENBLAS_PATH="${OPENBLAS_PATH//\\//}"
|
|||
if [[ -n "${BUILD_PATH:-}" ]]; then
|
||||
PREVIFS="$IFS"
|
||||
IFS="$BUILD_PATH_SEPARATOR"
|
||||
echo "BUILD PATH BUILD_PATH_SEPARATOR IS $BUILD_PATH_SEPARATOR"
|
||||
for P in $BUILD_PATH; do
|
||||
if [[ -f "$P/include/openblas_config.h" ]]; then
|
||||
OPENBLAS_PATH="$P"
|
||||
|
@ -541,7 +534,6 @@ fi
|
|||
# replace any backslash with a slash
|
||||
OPENBLAS_PATH="${OPENBLAS_PATH//\\//}"
|
||||
|
||||
|
||||
mkbuilddir() {
|
||||
if [ "$CLEAN" == "true" ]; then
|
||||
echo "Removing blasbuild"
|
||||
|
@ -609,9 +601,9 @@ if [ "$MAKE_COMMAND" == "make" ]; then
|
|||
MAKE_ARGUMENTS="$MAKE_ARGUMENTS --output-sync=target"
|
||||
fi
|
||||
|
||||
exec 3>&1
|
||||
exec 3>&1
|
||||
eval "$MAKE_COMMAND" "$MAKE_ARGUMENTS" 2>&1 >&3 3>&- | python3 ../../auto_vectorization/auto_vect.py && cd ../../..
|
||||
exec 3>&-
|
||||
else
|
||||
eval "$MAKE_COMMAND" "$MAKE_ARGUMENTS" && cd ../../..
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
# CMake toolchain to build for Android 5.0 or newer. Sample usage:
|
||||
#
|
||||
set(CMAKE_SYSTEM_NAME Android)
|
||||
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)
|
||||
set(CMAKE_ANDROID_NDK "$ENV{ANDROID_NDK}")
|
||||
set(CMAKE_ANDROID_STL_TYPE c++_shared)
|
||||
set(CMAKE_SYSTEM_VERSION "$ENV{ANDROID_VERSION}")
|
||||
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
|
||||
|
||||
set(ANDROID TRUE)
|
||||
if (WIN32)
|
||||
set(CMAKE_C_COMPILER "$ENV{ANDROID_CC}.exe")
|
||||
set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++.exe")
|
||||
else()
|
||||
set(CMAKE_C_COMPILER "$ENV{ANDROID_CC}")
|
||||
set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++")
|
||||
endif (WIN32)
|
||||
|
||||
|
||||
|
||||
add_definitions(-D__ANDROID_API__=$ENV{ANDROID_VERSION} -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target aarch64-none-linux-android -march=armv8-a)
|
||||
|
||||
# CMake toolchain to build for Android 5.0 or newer. Sample usage:
|
||||
#
|
||||
set(CMAKE_SYSTEM_NAME Android)
|
||||
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)
|
||||
set(CMAKE_ANDROID_NDK "$ENV{ANDROID_NDK}")
|
||||
set(CMAKE_ANDROID_STL_TYPE c++_shared)
|
||||
set(CMAKE_SYSTEM_VERSION "$ENV{ANDROID_VERSION}")
|
||||
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
|
||||
|
||||
set(ANDROID TRUE)
|
||||
if (WIN32)
|
||||
set(CMAKE_C_COMPILER "$ENV{ANDROID_CC}.exe")
|
||||
set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++.exe")
|
||||
else()
|
||||
set(CMAKE_C_COMPILER "$ENV{ANDROID_CC}")
|
||||
set(CMAKE_CXX_COMPILER "$ENV{ANDROID_CC}++")
|
||||
endif (WIN32)
|
||||
|
||||
|
||||
|
||||
add_definitions(-D__ANDROID_API__=$ENV{ANDROID_VERSION} -DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -target aarch64-none-linux-android -march=armv8-a)
|
||||
|
||||
|
|
|
@ -287,6 +287,25 @@
|
|||
<javacpp.platform.extension>-avx512</javacpp.platform.extension>
|
||||
</properties>
|
||||
</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>
|
||||
<id>libnd4j-assembly</id>
|
||||
|
|
Loading…
Reference in New Issue