cmake -E env equivalent in 2.8

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cmake -E env equivalent in 2.8

zer0 0ne
Hi,

I am new to cmake and i am working with CMakefile with -E env option written for 3.1 and I am backporting it to 2.8. What is the compatible or equivalent option in 2.8?

https://github.com/CZ-NIC/turris-os/blob/master/package/system/ubus/patches/001-python.patch

The line I am dealing with is
+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})"
+)

Thanks
Zer0 0ne

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake