You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ab...@apache.org on 2018/08/24 09:08:05 UTC

[3/3] kudu git commit: [cmake] add OpenSSL include path into -isystem

[cmake] add OpenSSL include path into -isystem

Prior to this change, when OpenSSL package is installed under the same
prefix as boost package (e.g. /opt/local on OS X if using MacPorts),
running cmake will choose the thirdparty-built boost, but due to the
intermix of '-isystem' and '-I' options, the '-I' path wins when running
the compiler.  I.e., the path specified with the '-I' option is chosen
over the path specified with the '-isystem' option if the latter comes
first in the command line.  That could lead to mysterious compilation
errors if the version and features of the OS-packaged boost library
differ from those compiled under $KUDU_HOME/thirdparty.

This patch puts the OpenSSL's include path into the -isystem
category along with other third-party libraries used by Kudu.  Aside
from resolving the inconsistency mentioned above, this makes the usage
of the angle brackets vs quotes in #include statement to be in sync with
the way how OpenSSL headers are included into the Kudu source files.

Change-Id: I345bf5f72fb9c899340339452ba1464becd6ada3
Reviewed-on: http://gerrit.cloudera.org:8080/11311
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Alexey Serbin <as...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/d3ef58b7
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/d3ef58b7
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/d3ef58b7

Branch: refs/heads/master
Commit: d3ef58b71c83f5e6afa7c9f6cc5d42be82e5f7d8
Parents: 51519e6
Author: Alexey Serbin <as...@cloudera.com>
Authored: Thu Aug 23 15:36:05 2018 -0700
Committer: Alexey Serbin <as...@cloudera.com>
Committed: Fri Aug 24 00:41:58 2018 +0000

----------------------------------------------------------------------
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/d3ef58b7/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1458bc8..559e3e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1106,7 +1106,7 @@ if (NOT OPENSSL_ROOT_DIR AND EXISTS "${CENTOS_6_4_OPENSSL_DIR}")
   set(OPENSSL_ROOT_DIR "${CENTOS_6_4_OPENSSL_DIR}")
 endif()
 find_package(OpenSSL 1.0.0 REQUIRED)
-include_directories(${OPENSSL_INCLUDE_DIR})
+include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR})
 ADD_THIRDPARTY_LIB(openssl_ssl
   SHARED_LIB "${OPENSSL_SSL_LIBRARY}")
 ADD_THIRDPARTY_LIB(openssl_crypto