Use ${PYTHON_EXECUTABLE} instead of 'python' in CMakeLists.txt
This commit is contained in:
parent
04eb33771c
commit
204ea1a1a2
@ -256,7 +256,7 @@ if (OPM_ENABLE_PYTHON)
|
|||||||
python/cxx/table_manager.cpp
|
python/cxx/table_manager.cpp
|
||||||
python/cxx/well.cpp
|
python/cxx/well.cpp
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/python/ ${CMAKE_BINARY_DIR}/python
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/python/ ${CMAKE_BINARY_DIR}/python
|
||||||
COMMAND python ${CMAKE_BINARY_DIR}/python/setup.py
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/python/setup.py
|
||||||
build
|
build
|
||||||
build_ext
|
build_ext
|
||||||
--build-lib=${CMAKE_BINARY_DIR}/python/python/opm
|
--build-lib=${CMAKE_BINARY_DIR}/python/python/opm
|
||||||
@ -268,11 +268,11 @@ if (OPM_ENABLE_PYTHON)
|
|||||||
add_dependencies(opmcommon_python opmcommon)
|
add_dependencies(opmcommon_python opmcommon)
|
||||||
|
|
||||||
install( CODE "execute_process(COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PREFIX} )" )
|
install( CODE "execute_process(COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_PREFIX} )" )
|
||||||
install( CODE "execute_process(COMMAND python python/setup.py build_ext --dry-run install --prefix=${CMAKE_INSTALL_PREFIX} )" )
|
install( CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} python/setup.py build_ext --dry-run install --prefix=${CMAKE_INSTALL_PREFIX} )" )
|
||||||
|
|
||||||
add_test(NAME python_tests
|
add_test(NAME python_tests
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/python
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/python
|
||||||
COMMAND python setup.py build_ext --dry-run --build-lib ${CMAKE_BINARY_DIR}/python/python/opm test
|
COMMAND ${PYTHON_EXECUTABLE} setup.py build_ext --dry-run --build-lib ${CMAKE_BINARY_DIR}/python/python/opm test
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(opmcommon PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
set_target_properties(opmcommon PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||||
|
@ -14,6 +14,6 @@ rm -f python/opm/libopmcommon_python.so
|
|||||||
|
|
||||||
export CC=@CMAKE_CXX_COMPILER@
|
export CC=@CMAKE_CXX_COMPILER@
|
||||||
|
|
||||||
python setup.py build build_ext --build-lib=python/opm \
|
@PYTHON_EXECUTABLE@ setup.py build build_ext --build-lib=python/opm \
|
||||||
--library-dirs=@_setup_lib_dirs@ \
|
--library-dirs=@_setup_lib_dirs@ \
|
||||||
--include-dirs=@_setup_include_dirs@
|
--include-dirs=@_setup_include_dirs@
|
||||||
|
@ -14,4 +14,4 @@ export PYTHONPPATH=@PROJECT_BINARY_DIR@/python/python:$PYTHONPATH
|
|||||||
export LD_LIBRARY_PATH=@PROJECT_BINARY_DIR@/lib:@_setup_lib_dirs@:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=@PROJECT_BINARY_DIR@/lib:@_setup_lib_dirs@:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
|
||||||
python setup.py build_ext --dry-run --build-lib=python/opm test
|
@PYTHON_EXECUTABLE@ setup.py build_ext --dry-run --build-lib=python/opm test
|
||||||
|
Loading…
Reference in New Issue
Block a user