Browse Source

update cmake bugs

tags/v1.1.0
taoxiangdong 3 years ago
parent
commit
9ea8c83641
4 changed files with 11 additions and 11 deletions
  1. +1
    -1
      CMakeLists.txt
  2. +1
    -1
      build.sh
  3. +1
    -1
      ge/CMakeLists.txt
  4. +8
    -8
      third_party/patch/securec/0001-add-securec-cmake-script.patch

+ 1
- 1
CMakeLists.txt View File

@@ -22,7 +22,7 @@ if (ENABLE_OPEN_SRC)

# for CPU/GPU mode, find c_sec and slog from local prebuild
if(NOT ENABLE_D AND NOT GE_ONLY)
set(GE_PREBUILD_PATH ${GE_SOURCE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR})
set(GE_PREBUILD_PATH ${GE_CODE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR})
find_module(slog libslog.so ${GE_PREBUILD_PATH})
# if D_LINK_PATH is set in environment variables, search libraries in given path
elseif(DEFINED ENV{D_LINK_PATH})


+ 1
- 1
build.sh View File

@@ -117,7 +117,7 @@ build_graphengine()
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_GE_ST=ON"
fi

CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_OPEN_SRC=True
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_OPEN_SRC=True"
echo "${CMAKE_ARGS}"
cmake ${CMAKE_ARGS} ../..
make ${VERBOSE} -j${THREAD_NUM}


+ 1
- 1
ge/CMakeLists.txt View File

@@ -4,7 +4,7 @@ add_subdirectory(graph/build/memory)
add_subdirectory(ge_local_engine)
add_subdirectory(host_cpu_engine)
add_subdirectory(executor)
#add_subdirectory(offline)
add_subdirectory(offline)

set(PROTO_LIST
"${METADEF_DIR}/proto/fusion_model.proto"


+ 8
- 8
third_party/patch/securec/0001-add-securec-cmake-script.patch View File

@@ -1,4 +1,4 @@
From f568b2731ac5356673e43361d718bb12704e05a9 Mon Sep 17 00:00:00 2001
From 455c9812d70646fe725896d597d6c953bf5a09ac Mon Sep 17 00:00:00 2001
From: taoxiangdong <taoxiangdong1@huawei.com>
Date: Wed, 14 Oct 2020 22:14:01 +0800
Subject: [PATCH] add securec cmake script
@@ -10,15 +10,15 @@ Subject: [PATCH] add securec cmake script

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755
index 0000000..7d59953
index 0000000..9b91fb2
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,86 @@
+cmake_minimum_required(VERSION 3.14)
+project (Securec)
+project(Securec)
+file(GLOB SRC_LIST RELATIVE ${CMAKE_CURRENT_LIST_DIR}
+ "src/vsprintf_s.c"
+ "src/wmemmove_s"
+ "src/wmemmove_s.c"
+ "src/strncat_s.c"
+ "src/vsnprintf_s.c"
+ "src/fwscanf_s.c"
@@ -59,7 +59,7 @@ index 0000000..7d59953
+ )
+
+include_directories(./include)
+include_directories(../src)
+include_directories(./src)
+add_library(shared_c_sec SHARED ${SRC_LIST})
+
+target_compile_options(shared_c_sec PRIVATE
@@ -71,7 +71,7 @@ index 0000000..7d59953
+target_compile_definitions(shared_c_sec PRIVATE
+ NDEBUG
+ SECUREC_SUPPORT_STRTOLD=1
+)
+ )
+
+add_library(static_c_sec STATIC ${SRC_LIST})
+
@@ -82,10 +82,10 @@ index 0000000..7d59953
+ -O1
+)
+
+target_compile_options(static_c_sec PRIVATE
+target_compile_definitions(static_c_sec PRIVATE
+ NDEBUG
+ SECUREC_SUPPORT_STRTOLD=1
+)
+ )
+
+set_target_properties(static_c_sec
+ PROPERTIES


Loading…
Cancel
Save