diff --git a/CMakeLists.txt b/CMakeLists.txt index 89473e9f329a0a37dd3ed24f20e13d00513fca1f..9baf1981afdfb7fb53df0bb99a086e0bf18d495f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ option(MALI_GPU "mali gpu" OFF) option(FPGA "fpga" OFF) set(DEBUGING ON) +if (ARM_LINUX) +include("${CMAKE_CURRENT_LIST_DIR}/tools/arm-platform.cmake") +endif () + file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c) file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h) diff --git a/Dockerfile b/Dockerfile index 8f54b870d594ece33d9c93ea40908668d3ad2f0e..df7df032acefd39c20051e861d353644e3b91024 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,6 @@ RUN apt-get install -y --no-install-recommends \ unzip \ git \ make \ - cmake \ cmake-curses-gui \ python \ python-pip \ @@ -25,9 +24,14 @@ RUN apt-get install -y --no-install-recommends \ g++-arm-linux-gnueabi \ gcc-arm-linux-gnueabi RUN apt-get autoremove -y && apt-get clean -RUN pip install --upgrade pip -RUN pip install wheel && pip install pre-commit RUN ln -s clang-format-5.0 /usr/bin/clang-format +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple wheel +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pre-commit RUN cd /tmp && curl -O http://mirrors.neusoft.edu.cn/android/repository/android-ndk-r17b-linux-x86_64.zip +RUN curl -O https://mms-res.cdn.bcebos.com/cmake-3.10.3-Linux-x86_64.tar.gz && \ + tar xzf cmake-3.10.3-Linux-x86_64.tar.gz && \ + mv cmake-3.10.3-Linux-x86_64 /opt/cmake-3.10 && \ + mv /usr/bin/cmake /usr/bin/cmake.bak && ln -s /opt/cmake-3.10/bin/cmake /usr/bin/cmake RUN cd /opt && unzip /tmp/android-ndk-r17b-linux-x86_64.zip ENV NDK_ROOT /opt/android-ndk-r17b diff --git a/tools/toolchains/arm-linux-gnueabi.cmake b/tools/toolchains/arm-linux-gnueabi.cmake index ee3cb50796d184f9f4577e8aabb4cf0ca98c955f..c2b1b853def5f470565e670751708f76c59e16c4 100644 --- a/tools/toolchains/arm-linux-gnueabi.cmake +++ b/tools/toolchains/arm-linux-gnueabi.cmake @@ -13,4 +13,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -include("${CMAKE_CURRENT_LIST_DIR}/../arm-platform.cmake") +set(ARM_LINUX 1)