[
https://issues.apache.org/jira/browse/DRILL-5924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16498875#comment-16498875
]
ASF GitHub Bot commented on DRILL-5924:
---
parthchandra closed pull request #1022: DRILL-5924: native-client: Support
user-specified CXX_FLAGS
URL: https://github.com/apache/drill/pull/1022
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/contrib/native/client/CMakeLists.txt
b/contrib/native/client/CMakeLists.txt
index 3f6c44b609..f434c41021 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 7b9ecc3c0f..e793e668b4 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 1cb4d72223..bfc3fb4e62 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 95001c595e..b113234c7e 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.
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
> native-client: Support user-specified CXX_FLAGS
> ---
>
> Key: DRILL-5924
> URL: https://issues.apache.org/jira/browse/DRILL-5924
> Project: Apache Drill
> Issue Type: Improvement
> Components: Client - C++
>Reporter: Uwe L. Korn
>Priority: Trivial
>
> Currently the build process for the native client overrides the CXX_FLAGS
> supplied by the user. In some cases we need to pass additional flags, e.g.
> {{-fpermissive}}, to the build to have it succeed. Thus instead of overriding
> these flags, they should only be expanded.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)