drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From par...@apache.org
Subject [drill] 09/10: DRILL-5924: native-client: Support user-specified CXX_FLAGS
Date Sat, 02 Jun 2018 04:50:17 GMT
This is an automated email from the ASF dual-hosted git repository.

parthc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git

commit 7f30b0464f60a617be727c6c8b31b5c634564cff
Author: Korn, Uwe <Uwe.Korn@blue-yonder.com>
AuthorDate: Sat Oct 28 21:45:51 2017 +0200

    DRILL-5924: native-client: Support user-specified CXX_FLAGS
    
    This closes #1022
---
 contrib/native/client/CMakeLists.txt                     | 9 +++++----
 contrib/native/client/src/clientlib/CMakeLists.txt       | 1 -
 contrib/native/client/src/clientlib/y2038/CMakeLists.txt | 8 --------
 contrib/native/client/src/protobuf/CMakeLists.txt        | 4 ----
 4 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/contrib/native/client/CMakeLists.txt b/contrib/native/client/CMakeLists.txt
index 3f6c44b..f434c41 100644
--- a/contrib/native/client/CMakeLists.txt
+++ b/contrib/native/client/CMakeLists.txt
@@ -101,13 +101,14 @@ find_package(Boost 1.53.0 REQUIRED COMPONENTS regex system date_time
chrono thre
 include_directories(${Boost_INCLUDE_DIRS})
 
 
-if(CMAKE_COMPILER_IS_GNUCXX)
-    set(CMAKE_EXE_LINKER_FLAGS "-lrt -lpthread")
-    set(CMAKE_CXX_FLAGS "-fPIC")
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lrt -lpthread")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
 endif()
 
 if(MSVC)
-    set(CMAKE_CXX_FLAGS "/EHsc")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
 endif()
 
 if(MSVC)
diff --git a/contrib/native/client/src/clientlib/CMakeLists.txt b/contrib/native/client/src/clientlib/CMakeLists.txt
index 7b9ecc3..e793e66 100644
--- a/contrib/native/client/src/clientlib/CMakeLists.txt
+++ b/contrib/native/client/src/clientlib/CMakeLists.txt
@@ -50,7 +50,6 @@ set_property(
     )
 
 if(MSVC)
-    set(CMAKE_CXX_FLAGS "/EHsc")
     add_definitions(-DDRILL_CLIENT_EXPORTS -D_SCL_SECURE_NO_WARNINGS)
 endif()
 
diff --git a/contrib/native/client/src/clientlib/y2038/CMakeLists.txt b/contrib/native/client/src/clientlib/y2038/CMakeLists.txt
index 1cb4d72..bfc3fb4 100644
--- a/contrib/native/client/src/clientlib/y2038/CMakeLists.txt
+++ b/contrib/native/client/src/clientlib/y2038/CMakeLists.txt
@@ -18,14 +18,6 @@
 
 # Y2038 library
 
-if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
-    set(CMAKE_CXX_FLAGS "-fPIC")
-endif()
-
-if(CMAKE_COMPILER_IS_GNUCC)
-    set(CMAKE_C_FLAGS "-fPIC")
-endif()
-
 set (Y2038_SRC_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/time64.c
     )
diff --git a/contrib/native/client/src/protobuf/CMakeLists.txt b/contrib/native/client/src/protobuf/CMakeLists.txt
index 95001c5..b113234 100644
--- a/contrib/native/client/src/protobuf/CMakeLists.txt
+++ b/contrib/native/client/src/protobuf/CMakeLists.txt
@@ -103,10 +103,6 @@ add_custom_target(cpProtobufs
 #message("ProtoHeaders =  ${ProtoHeaders}" )
 #message("ProtoIncludes =  ${ProtoIncludes}" )
 
-if(MSVC)
-    set(CMAKE_CXX_FLAGS "/EHsc")
-endif()
-
 add_library(protomsgs STATIC ${ProtoSources} ${ProtoHeaders} ${ProtoIncludes} )
 #set linker properties. The first time around, the protobufs generated files may not exist
 # and CMAKE will not be able to determine the linker type.

-- 
To stop receiving notification emails like this one, please contact
parthc@apache.org.

Mime
View raw message