Browse Source

update cmake

pull/29/head
taoxiangdong 5 years ago
parent
commit
746af0b30f
8 changed files with 11 additions and 12 deletions
  1. +4
    -5
      CMakeLists.txt
  2. +1
    -1
      cmake/external_libs/gflags.cmake
  3. +1
    -1
      cmake/external_libs/json.cmake
  4. +1
    -1
      cmake/external_libs/onnx.cmake
  5. +1
    -1
      cmake/external_libs/protobuf_shared.cmake
  6. +1
    -1
      cmake/external_libs/protobuf_static.cmake
  7. +1
    -1
      cmake/external_libs/protoc.cmake
  8. +1
    -1
      metadef

+ 4
- 5
CMakeLists.txt View File

@@ -39,12 +39,11 @@ if (ENABLE_OPEN_SRC)
set(ASCEND_DIR /usr/local/Ascend)
endif()

set(ASCEND_DRIVER_DIR ${ASCEND_DIR}/driver/lib64/common)
set(ASCEND_RUNTIME_DIR ${ASCEND_DIR}/fwkacllib/lib64)
set(ASCEND_ATC_DIR ${ASCEND_DIR}/atc/lib64)

find_module(slog libslog.so ${ASCEND_DRIVER_DIR})
find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR})
find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR})
find_module(slog libslog.so ${ASCEND_ATC_DIR})
find_module(mmpa libmmpa.so ${ASCEND_ATC_DIR})
find_module(error_manager liberror_manager.so ${ASCEND_ATC_DIR})
endif()

if (NOT DEFINED METADEF_DIR)


+ 1
- 1
cmake/external_libs/gflags.cmake View File

@@ -14,7 +14,7 @@ endif()
ExternalProject_Add(gflags_build
URL https://github.com/gflags/gflags/archive/v2.2.2.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
SOURCE_DIR ${PARSER_DIR}/../../third_party/gflags/src/gflags-2.2.2
#SOURCE_DIR ${PARSER_DIR}/../../third_party/gflags/src/gflags-2.2.2
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/gflags <SOURCE_DIR>
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install


+ 1
- 1
cmake/external_libs/json.cmake View File

@@ -8,7 +8,7 @@ set(JSON_SRC_DIR ${PARSER_DIR}/../../third_party/json/include)
ExternalProject_Add(json_build
URL https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip
#URL /home/txd/workspace/cloud_code/pkg/include.zip
SOURCE_DIR ${JSON_SRC_DIR}
#SOURCE_DIR ${JSON_SRC_DIR}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""


+ 1
- 1
cmake/external_libs/onnx.cmake View File

@@ -8,7 +8,7 @@ file(MAKE_DIRECTORY ${ONNX_PROTO_DIR})

ExternalProject_Add(onnx
URL https://github.com/onnx/onnx/releases/download/v1.6.0/onnx-1.6.0.tar.gz
URL /home/txd/workspace/cloud_code/pkg/onnx-1.6.0.tar.gz
#URL /home/txd/workspace/cloud_code/pkg/onnx-1.6.0.tar.gz
#URL_HASH SHA256=3b88c3fe521151651a0403c4d131cb2e0311bd28b753ef692020a432a81ce345
#SOURCE_DIR ${ONNX_SRC_DIR}
CONFIGURE_COMMAND ""


+ 1
- 1
cmake/external_libs/protobuf_shared.cmake View File

@@ -17,7 +17,7 @@ ExternalProject_Add(protobuf_build
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
#SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 <SOURCE_DIR>
#DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 <SOURCE_DIR>
#CONFIGURE_COMMAND ${CMAKE_COMMAND}
#-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
#-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}


+ 1
- 1
cmake/external_libs/protobuf_static.cmake View File

@@ -14,7 +14,7 @@ set(PROTOBUF_STATIC_PKG_DIR ${CMAKE_INSTALL_PREFIX}/protobuf_static)
ExternalProject_Add(protobuf_static_build
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
SOURCE_DIR ${PARSER_DIR}/../../third_party/protobuf/src/protobuf-3.8.0
#SOURCE_DIR ${PARSER_DIR}/../../third_party/protobuf/src/protobuf-3.8.0
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}


+ 1
- 1
cmake/external_libs/protoc.cmake View File

@@ -17,7 +17,7 @@ set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
ExternalProject_Add(protoc_build
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0
#SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0
CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc <SOURCE_DIR>/cmake
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 149bd45f98b1984143cb6341bb93c9aea7154aa3
Subproject commit e79f45025b95a7295bdffa38a1b720bfd6609ae9

Loading…
Cancel
Save