]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind: silence gcc warnings about '-Wstrict-prototypes'
authorKefu Chai <kchai@redhat.com>
Tue, 12 Apr 2016 03:49:27 +0000 (11:49 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 22 Apr 2016 13:36:11 +0000 (21:36 +0800)
this silences following warning

```
warning: cc1plus: command line option ‘-Wstrict-prototypes’ is valid for
C/ObjC but not for C++ [enabled by default]
```

* distutils pass "-DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes" to
  compiler by default if OPT environment variable is not set. so we opt to
  remove '-Wstrict-prototypes' as we are using c++ as the language of the
  generated bindinging.
* also use "env" to pass the environment variables to avoid unnecessary
  quote added by distutils, which just breaks the generated CLI command
  line.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/cephfs/CMakeLists.txt
src/pybind/rados/CMakeLists.txt
src/pybind/rbd/CMakeLists.txt

index 21fcdb55d4b09fc9c0159c61da47a8975637f88f..2981a920b272ea2d7f46e6df022c32679f702d8e 100644 (file)
@@ -4,6 +4,7 @@ add_custom_target(cython_cephfs
   CC=${PY_CC}
   CXX=${PY_CXX}
   LDSHARED=${PY_LDSHARED}
+  OPT=\"-DNDEBUG -g -fwrapv -O2 -Wall\"
   LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
   CYTHON_BUILD_DIR=${CMAKE_BINARY_DIR}/src/pybind/cephfs
   CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\"
index efec92b1d810638b4b2d01526e7eeb9d78667d98..8bbe9cef968f6923a33231e2959d04e4d2a491a0 100644 (file)
@@ -4,6 +4,7 @@ add_custom_target(cython_rados
   CC=${PY_CC}
   CXX=${PY_CXX}
   LDSHARED=${PY_LDSHARED}
+  OPT=\"-DNDEBUG -g -fwrapv -O2 -Wall\"
   LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
   CYTHON_BUILD_DIR=${CMAKE_BINARY_DIR}/src/pybind/rados
   CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\"
index 3757911194c4188f2b1b42ebc18fe67d24f7d90d..52400c45004d7b2e6d8ab93c063d067b09430a59 100644 (file)
@@ -4,6 +4,7 @@ add_custom_target(cython_rbd
   CC=${PY_CC}
   CXX=${PY_CXX}
   LDSHARED=${PY_LDSHARED}
+  OPT=\"-DNDEBUG -g -fwrapv -O2 -Wall\"
   LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
   CYTHON_BUILD_DIR=${CMAKE_BINARY_DIR}/src/pybind/rbd
   CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\"