# Note: this is reproduced in distutils_install_cython_module
list(APPEND cflags -D'void0=dead_function\(void\)')
list(APPEND cflags -D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0')
+ cmake_parse_arguments(DU "DISABLE_VTA" "" "" ${ARGN})
+ if(DU_DISABLE_VTA AND HAS_VTA)
+ list(APPEND cflags -fno-var-tracking-assignments)
+ endif()
set(PY_CC ${compiler_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} ${cflags})
set(PY_CXX ${compiler_launcher} ${CMAKE_CXX_COMPILER} ${cxx_compiler_arg1})
set(PY_LDSHARED ${link_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} "-shared")
get_property(link_launcher GLOBAL PROPERTY RULE_LAUNCH_LINK)
set(PY_CC "${compiler_launcher} ${CMAKE_C_COMPILER}")
set(PY_LDSHARED "${link_launcher} ${CMAKE_C_COMPILER} -shared")
+ cmake_parse_arguments(DU "DISABLE_VTA" "" "" ${ARGN})
+ if(DU_DISABLE_VTA AND HAS_VTA)
+ set(CFLAG_DISABLE_VTA -fno-var-tracking-assignments)
+ endif()
install(CODE "
set(ENV{CC} \"${PY_CC}\")
set(ENV{LDSHARED} \"${PY_LDSHARED}\")
set(ENV{CPPFLAGS} \"-iquote${CMAKE_SOURCE_DIR}/src/include
-D'void0=dead_function\(void\)' \
- -D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0'\")
+ -D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0' \
+ ${CFLAG_DISABLE_VTA}\")
set(ENV{LDFLAGS} \"-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
set(ENV{CYTHON_BUILD_DIR} \"${CMAKE_CURRENT_BINARY_DIR}\")
set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
distutils_add_cython_module(cython_rados
rados
- ${CMAKE_CURRENT_SOURCE_DIR}/rados.pyx)
+ ${CMAKE_CURRENT_SOURCE_DIR}/rados.pyx
+ DISABLE_VTA)
add_dependencies(cython_rados rados)
-distutils_install_cython_module(cython_rados)
+distutils_install_cython_module(cython_rados
+ DISABLE_VTA)