Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THRIFT-3828 In cmake avoid use of both quoted paths and SYSTEM with include_directories() #1082

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/cpp/CMakeLists.txt
Expand Up @@ -24,7 +24,7 @@ else()
find_package(Boost 1.53.0 REQUIRED)
endif()

include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
include_directories(${Boost_INCLUDE_DIRS})
include_directories(src)

# SYSLIBS contains libraries that need to be linked to all lib targets
Expand Down Expand Up @@ -104,7 +104,7 @@ if(OPENSSL_FOUND AND WITH_OPENSSL)
src/thrift/transport/TSSLSocket.cpp
src/thrift/transport/TSSLServerSocket.cpp
)
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
include_directories(${OPENSSL_INCLUDE_DIR})
list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}")
endif()

Expand Down Expand Up @@ -177,7 +177,7 @@ endif()

if(WITH_LIBEVENT)
find_package(Libevent REQUIRED) # Libevent comes with CMake support form upstream
include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS})
include_directories(${LIBEVENT_INCLUDE_DIRS})

ADD_LIBRARY_THRIFT(thriftnb ${thriftcppnb_SOURCES})
TARGET_LINK_LIBRARIES_THRIFT(thriftnb ${SYSLIBS} ${LIBEVENT_LIBRARIES})
Expand All @@ -186,7 +186,7 @@ endif()

if(WITH_ZLIB)
find_package(ZLIB REQUIRED)
include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS})
include_directories(${ZLIB_INCLUDE_DIRS})

ADD_LIBRARY_THRIFT(thriftz ${thriftcppz_SOURCES})
TARGET_LINK_LIBRARIES_THRIFT(thriftz ${SYSLIBS} ${ZLIB_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp/test/CMakeLists.txt
Expand Up @@ -20,7 +20,7 @@
# Find required packages
set(Boost_USE_STATIC_LIBS ON) # Force the use of static boost test framework
find_package(Boost 1.53.0 REQUIRED COMPONENTS chrono filesystem system thread unit_test_framework)
include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
include_directories(${Boost_INCLUDE_DIRS})

if (WITH_DYN_LINK_TEST)
add_definitions( -DBOOST_TEST_DYN_LINK )
Expand Down
6 changes: 3 additions & 3 deletions test/cpp/CMakeLists.txt
Expand Up @@ -22,13 +22,13 @@ include(ThriftMacros)

set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.53.0 REQUIRED COMPONENTS program_options system filesystem)
include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
include_directories(${Boost_INCLUDE_DIRS})

find_package(OpenSSL REQUIRED)
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
include_directories(${OPENSSL_INCLUDE_DIR})

find_package(Libevent REQUIRED) # Libevent comes with CMake support from upstream
include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS})
include_directories(${LIBEVENT_INCLUDE_DIRS})

#Make sure gen-cpp files can be included
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
Expand Down
2 changes: 1 addition & 1 deletion tutorial/cpp/CMakeLists.txt
Expand Up @@ -18,7 +18,7 @@
#

find_package(Boost 1.53.0 REQUIRED)
include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
include_directories(${Boost_INCLUDE_DIRS})

#Make sure gen-cpp files can be included
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
Expand Down