Skip to content

Commit b7f2e2a

Browse files
committed
Merge pull request #201 from torbjoernk/fix/juqueen-python
cmake: juqueen: CMake's find_program sucks :-/
2 parents df82297 + bf65260 commit b7f2e2a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,14 @@ message(STATUS "****************************************************************
155155
message(STATUS "Configuring sources")
156156
update_site_config()
157157

158-
find_package(PythonInterp REQUIRED)
158+
if(NOT PYTHON_EXECUTABLE)
159+
find_package(PythonInterp 2.7)
160+
if(NOT PYTHONINTERP_FOUND)
161+
find_package(PythonInterp 3 REQUIRED)
162+
endif()
163+
else()
164+
message(STATUS "Using specified Python executable: ${PYTHON_EXECUTABLE}")
165+
endif()
159166
add_custom_target(set_version ALL
160167
COMMAND ${PYTHON_EXECUTABLE} ${pfasst_SOURCE_DIR}/tools/get_pfasst_version.py
161168
WORKING_DIRECTORY ${pfasst_SOURCE_DIR}

cmake/toolchain_juqueen.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Make sure you have loaded only the following modules:
88
# - gcc/4.8.1
99
# - fftw3/3.3.3
10+
# - python3/3.4.2
1011
#
1112
# As well make sure you have built boost::program_options according to the instructions from the
1213
# PFASST++ documentation on JUQUEEN.
@@ -22,3 +23,5 @@ set(MPI_ROOT /bgsys/local/gcc/4.8.1)
2223
set(MPI_C_COMPILER ${MPI_ROOT}/bin/mpigcc)
2324
set(MPI_CXX_COMPILER ${MPI_ROOT}/bin/mpig++)
2425
set(MPI_Fortran_COMPILER ${MPI_ROOT}/bin/mpigfortran)
26+
27+
set(PYTHON_EXECUTABLE /bgsys/local/python3/3.4.2/bin/python3)

0 commit comments

Comments
 (0)