You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesatee.apache.org by ms...@apache.org on 2019/11/26 04:12:43 UTC

[incubator-mesatee] branch master updated: [protected_fs] fix cmake (#97)

This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mesatee.git


The following commit(s) were added to refs/heads/master by this push:
     new 439c7f2  [protected_fs] fix cmake (#97)
439c7f2 is described below

commit 439c7f2f0c672736a1823b2be5d966ce91b77ffc
Author: Zhaofeng Chen <ch...@gmail.com>
AuthorDate: Mon Nov 25 20:12:37 2019 -0800

    [protected_fs] fix cmake (#97)
---
 .../protected_fs_rs/protected_fs_c/CMakeLists.txt        | 16 ++--------------
 .../protected_fs_c/sgx_tprotected_fs/CMakeLists.txt      |  2 ++
 .../protected_fs_c/sgx_uprotected_fs/CMakeLists.txt      |  3 +--
 3 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/mesatee_utils/protected_fs_rs/protected_fs_c/CMakeLists.txt b/mesatee_utils/protected_fs_rs/protected_fs_c/CMakeLists.txt
index 825ed24..bda97e0 100644
--- a/mesatee_utils/protected_fs_rs/protected_fs_c/CMakeLists.txt
+++ b/mesatee_utils/protected_fs_rs/protected_fs_c/CMakeLists.txt
@@ -26,21 +26,9 @@ elseif (NOT EXISTS ${SGX_SDK})
     message(FATAL_ERROR "$SGX_SDK directory must exist")
 else ()
     message("SGX_SDK=${SGX_SDK}")
-
     set(SGX_LIBRARY_PATH  ${SGX_SDK}/lib64)
-    set(SGX_COMMON_CFLAGS  -m64 -O2)
-    set(SGX_UNTRUSTED_CFLAGS  ${SGX_COMMON_CFLAGS} -fPIC -Wno-attributes
-        -I${SGX_SDK}/include)
-    set(SGX_TRUSTED_CFLAGS  ${SGX_COMMON_CFLAGS} -nostdinc -fvisibility=hidden
-        -fpie -fstack-protector
-        -I${SGX_SDK}/include -I${SGX_SDK}/include/tlibc
-        -I${SGX_SDK}/include/stdc++ -I${SGX_SDK}/include/libcxx 
-        -I${SGX_SDK}/include/stlport -I${SGX_SDK}/include/epid)
-
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -U__STRICT_ANSI__ -Werror")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs -Wno-shadow -Wno-missing-field-initializers -Wno-unused-parameter")
-    set(${PROJECT_NAME}_sgx_tprotected_fs_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SGX_TRUSTED_CFLAGS}")
-    set(${PROJECT_NAME}_sgx_uprotected_fs_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SGX_UNTRUSTED_CFLAGS}")
+    set(SGX_COMMON_CFLAGS  "-m64 -O2")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -U__STRICT_ANSI__ -Werror -Wno-unused-local-typedefs -Wno-shadow -Wno-missing-field-initializers -Wno-unused-parameter")
 endif (NON_SGX_PROTECTED_FS)
 
 add_subdirectory (sgx_tprotected_fs)
diff --git a/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_tprotected_fs/CMakeLists.txt b/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_tprotected_fs/CMakeLists.txt
index 7daef15..089926c 100644
--- a/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_tprotected_fs/CMakeLists.txt
+++ b/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_tprotected_fs/CMakeLists.txt
@@ -2,6 +2,8 @@
 include_directories("${PROJECT_SOURCE_DIR}")
 
 if (NOT NON_SGX_PROTECTED_FS)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SGX_COMMON_CFLAGS} -nostdinc -fvisibility=hidden -fPIC -fstack-protector")
+
 include_directories("${SGX_SDK}/include")
 include_directories("${SGX_SDK}/include/tlibc")
 include_directories("${SGX_SDK}/include/libcxx")
diff --git a/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_uprotected_fs/CMakeLists.txt b/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_uprotected_fs/CMakeLists.txt
index 5f197bf..d1556f2 100644
--- a/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_uprotected_fs/CMakeLists.txt
+++ b/mesatee_utils/protected_fs_rs/protected_fs_c/sgx_uprotected_fs/CMakeLists.txt
@@ -1,9 +1,8 @@
-
 if (NOT NON_SGX_PROTECTED_FS)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SGX_COMMON_CFLAGS} -fPIC -Wno-attributes")
 include_directories("${SGX_SDK}/include")
 endif()
 
-
 add_library(uprotected_fs STATIC 
     sgx_uprotected_fs.cpp 
 )


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@mesatee.apache.org
For additional commands, e-mail: commits-help@mesatee.apache.org