提交 7638f0af 编写于 作者: P peizhilin

simplify the logic

上级 d01a2628
...@@ -72,51 +72,22 @@ IF(NOT ${CBLAS_FOUND}) ...@@ -72,51 +72,22 @@ IF(NOT ${CBLAS_FOUND})
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(WIN32) SET(COMMON_ARGS CC=${OPENBLAS_CC} NO_SHARED=1 NO_LAPACK=1 libs)
ExternalProject_Add( ExternalProject_Add(
extern_openblas extern_openblas
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
# GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git # GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git
GIT_REPOSITORY http://admin@172.20.90.14:8080/r/openblas.git GIT_REPOSITORY http://admin@172.20.90.14:8080/r/openblas.git
# GIT_TAG ${OPENBLAS_COMMIT} # GIT_TAG ${OPENBLAS_COMMIT}
PREFIX ${CBLAS_SOURCES_DIR} PREFIX ${CBLAS_SOURCES_DIR}
INSTALL_DIR ${CBLAS_INSTALL_DIR} INSTALL_DIR ${CBLAS_INSTALL_DIR}
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} ${COMMON_ARGS} ${OPTIONAL_ARGS}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR>
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} && rm -r ${CBLAS_INSTALL_DIR}/lib/cmake ${CBLAS_INSTALL_DIR}/lib/pkgconfig
-DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} UPDATE_COMMAND ""
-DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} CONFIGURE_COMMAND ""
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} )
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
-DNO_SHARED=ON
-DNO_STATIC=OFF
-DBUILD_WITHOUT_LAPACK=ON
-DUSE_THREAD=OFF
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CBLAS_INSTALL_DIR}
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
)
ELSE(WIN32)
SET(COMMON_ARGS CC=${OPENBLAS_CC} NO_SHARED=1 NO_LAPACK=1 libs)
ExternalProject_Add(
extern_openblas
${EXTERNAL_PROJECT_LOG_ARGS}
# GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git
GIT_REPOSITORY http://admin@172.20.90.14:8080/r/openblas.git
# GIT_TAG ${OPENBLAS_COMMIT}
PREFIX ${CBLAS_SOURCES_DIR}
INSTALL_DIR ${CBLAS_INSTALL_DIR}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} ${COMMON_ARGS} ${OPTIONAL_ARGS}
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR>
&& rm -r ${CBLAS_INSTALL_DIR}/lib/cmake ${CBLAS_INSTALL_DIR}/lib/pkgconfig
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
)
ENDIF(WIN32)
ENDIF (WITH_PREBUILD_OPENBLAS) ENDIF (WITH_PREBUILD_OPENBLAS)
SET(CBLAS_PROVIDER openblas) SET(CBLAS_PROVIDER openblas)
......
...@@ -320,8 +320,8 @@ op_library(save_op DEPS lod_tensor) ...@@ -320,8 +320,8 @@ op_library(save_op DEPS lod_tensor)
op_library(load_op DEPS lod_tensor) op_library(load_op DEPS lod_tensor)
op_library(save_combine_op DEPS lod_tensor) op_library(save_combine_op DEPS lod_tensor)
op_library(load_combine_op DEPS lod_tensor) op_library(load_combine_op DEPS lod_tensor)
op_library(tensor_array_to_tensor_op DEPS concat_op)
op_library(concat_op DEPS concat_and_split) op_library(concat_op DEPS concat_and_split)
op_library(tensor_array_to_tensor_op DEPS concat_op)
list(REMOVE_ITEM GENERAL_OPS ${DEPS_OPS}) list(REMOVE_ITEM GENERAL_OPS ${DEPS_OPS})
......
...@@ -44,7 +44,7 @@ limitations under the License. */ ...@@ -44,7 +44,7 @@ limitations under the License. */
#include <boost/variant.hpp> #include <boost/variant.hpp>
// some platform-independent defintion // some platform-independent defintion
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) #if defined(_WIN32)
#define __UNUSED__() #define __UNUSED__()
#define __builtin_expect(EXP, C) (EXP) #define __builtin_expect(EXP, C) (EXP)
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册