From: Josh Durgin Date: Wed, 30 Mar 2016 18:22:24 +0000 (-0700) Subject: cmake: remove unneeded C++ from cython build X-Git-Tag: ses3-milestone4~21^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=68ce9a9166a0d7f044c908944cf10368ac5a9bbb;p=ceph.git cmake: remove unneeded C++ from cython build It looks like the unnecessary internal include dirs in the cephfs cmake file were the reason language="c++" was added to pybind. The system utime.h was being aliased by ceph's include/utime.h. Fix this by using -iquote instead of -I, to only add ceph's include dir as a search path for quoted #includes, not sytem headers. The automake build already uses -iquote here. Signed-off-by: Josh Durgin --- diff --git a/src/pybind/cephfs/CMakeLists.txt b/src/pybind/cephfs/CMakeLists.txt index 91d36ceaa9d5..61c469823c2f 100644 --- a/src/pybind/cephfs/CMakeLists.txt +++ b/src/pybind/cephfs/CMakeLists.txt @@ -2,7 +2,7 @@ add_custom_target(cython_cephfs COMMAND LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CYTHON_BUILD_DIR=${CMAKE_BINARY_DIR}/src/pybind/cephfs - CFLAGS=\"-I${CMAKE_SOURCE_DIR}/src -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/src/include -std=c++11\" + CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\" python ${CMAKE_SOURCE_DIR}/src/pybind/cephfs/setup.py build --build-base ${CYTHON_MODULE_DIR} --verbose WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/cephfs DEPENDS rados cephfs) diff --git a/src/pybind/rados/CMakeLists.txt b/src/pybind/rados/CMakeLists.txt index 3b2cd38ff38e..750c8cacafc0 100644 --- a/src/pybind/rados/CMakeLists.txt +++ b/src/pybind/rados/CMakeLists.txt @@ -2,7 +2,7 @@ add_custom_target(cython_rados COMMAND LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CYTHON_BUILD_DIR=${CMAKE_BINARY_DIR}/src/pybind/rados - CFLAGS=\"-I${CMAKE_SOURCE_DIR}/src/include -std=c++11\" + CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\" python ${CMAKE_SOURCE_DIR}/src/pybind/rados/setup.py build --build-base ${CYTHON_MODULE_DIR} --verbose WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/rados DEPENDS rados) diff --git a/src/pybind/rbd/CMakeLists.txt b/src/pybind/rbd/CMakeLists.txt index b5881530e049..84cecd8e1de4 100644 --- a/src/pybind/rbd/CMakeLists.txt +++ b/src/pybind/rbd/CMakeLists.txt @@ -2,7 +2,7 @@ add_custom_target(cython_rbd COMMAND LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CYTHON_BUILD_DIR=${CMAKE_BINARY_DIR}/src/pybind/rbd - CFLAGS=\"-I${CMAKE_SOURCE_DIR}/src/include -std=c++11\" + CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\" python ${CMAKE_SOURCE_DIR}/src/pybind/rbd/setup.py build --build-base ${CYTHON_MODULE_DIR} --verbose WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/rbd DEPENDS rbd)