ECC-494 Python: output commands before running them

This commit is contained in:
Florian Rathgeber 2017-06-15 13:54:09 +01:00
parent 4e9c043c1e
commit 06546cc61c
1 changed files with 8 additions and 1 deletions

View File

@ -55,7 +55,9 @@ if( HAVE_PYTHON )
configure_file( swig_wrap_numpy.py gribapi/gribapi_swig.py COPYONLY ) configure_file( swig_wrap_numpy.py gribapi/gribapi_swig.py COPYONLY )
# Build the extension module for use in install tree with RPATH pointing to install tree # Build the extension module for use in install tree with RPATH pointing to install tree
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} setup.py build_ext --rpath ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} install(CODE "message(\"Building Python extension modules:
${PYTHON_EXECUTABLE} setup.py build_ext --rpath ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}\")
execute_process(COMMAND ${PYTHON_EXECUTABLE} setup.py build_ext --rpath ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
# Library installation directory override # Library installation directory override
@ -69,6 +71,11 @@ if( HAVE_PYTHON )
install(CODE "if( NOT \$ENV{DESTDIR} STREQUAL \"\" ) install(CODE "if( NOT \$ENV{DESTDIR} STREQUAL \"\" )
set( __root \"--root=\$ENV{DESTDIR}\" ) set( __root \"--root=\$ENV{DESTDIR}\" )
endif() endif()
message(\"Installing Python modules:
${PYTHON_EXECUTABLE} setup.py install \${__root}
${__install_lib}
--prefix=${CMAKE_INSTALL_PREFIX}
--record=${CMAKE_BINARY_DIR}/extra_install.txt\")
execute_process(COMMAND ${PYTHON_EXECUTABLE} setup.py install execute_process(COMMAND ${PYTHON_EXECUTABLE} setup.py install
\${__root} \${__root}
--prefix=${CMAKE_INSTALL_PREFIX} --prefix=${CMAKE_INSTALL_PREFIX}