我是cmake的新用户,我正在使用带有-E env选项的3.1 CMakefile,我将其向后移植到2.8。 2.8中的兼容或等效选项是什么?
https://github.com/CZ-NIC/turris-os/blob/master/package/system/ubus/patches/001-python.patch
我正在处理的是
+ADD_CUSTOM_TARGET(python ALL
+ COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}
${CMAKE_C_COMPILER_ARG1}" "LDSHARED=${LDSHARED}" "CFLAGS=${PYTHON_CFLAGS}"
${PYTHON} ${SETUP_PY} build
+ DEPENDS ubus "${CURRENT_SOURCE_DIR}/ubus_python.c"
+)
+
+INSTALL(
+ CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E env \"CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}\" \"LDSHARED=${LDSHARED}\" \"CFLAGS=${PYTHON_CFLAGS}\" ${PYTHON} ${SETUP_PY} install -- prefix=${CMAKE_INSTALL_PREFIX})"
+)
-Zer0_0ne