Skip to content
Snippets Groups Projects
Commit 967b8533 authored by Orgis, Dr. Thomas's avatar Orgis, Dr. Thomas
Browse files

updated DP3 patch from pull request

parent 6e37020c
No related branches found
No related tags found
No related merge requests found
commit 6d66554bcd1e6fbd0362d6805ccc0f0ca19e518d
Author: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
Date: Tue Jun 9 17:32:41 2020 +0200
build: fixup python search and support BLAS_LIBS, LAPACK_LIBS
This is a set of changes we carry at Universität Hamburg to get
the LOFAR toolchain built. I hope it can be included upstream.
Important points are:
- Use current (less deprecated) cmake ways to detect python.
- Less redundancy in Python checking in CMakeLists at deeper level
(Always try to build PythonDPPP as Python and Boost is required
anyway.)
- Add support for BLAS_LIBS and LAPACK_LIBS, as this is
customary in HPC installations to choose the (optimized) BLAS
implementation in an environment that offers multiple options.
The last point is repeated in other patches we carry for the LOFAR
stack. Maybe the common source for the FindCasacore code should
be patched instead?
diff --git a/CMake/FindCasacore.cmake b/CMake/FindCasacore.cmake diff --git a/CMake/FindCasacore.cmake b/CMake/FindCasacore.cmake
index e4689f7..9068fdd 100644 index e4689f7..9068fdd 100644
--- a/CMake/FindCasacore.cmake --- a/CMake/FindCasacore.cmake
...@@ -83,7 +106,7 @@ index 173f995..a1357c7 100644 ...@@ -83,7 +106,7 @@ index 173f995..a1357c7 100644
# Parse arguments. # Parse arguments.
# apart from the python files list, there are two additional arguments # apart from the python files list, there are two additional arguments
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ae97ae..3abc84e 100644 index 2943e17..ae2c423 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -44,13 +44,14 @@ endif(IDGAPI_LIBRARIES AND IDGAPI_INCLUDE_DIRS) @@ -44,13 +44,14 @@ endif(IDGAPI_LIBRARIES AND IDGAPI_INCLUDE_DIRS)
...@@ -105,7 +128,7 @@ index 0ae97ae..3abc84e 100644 ...@@ -105,7 +128,7 @@ index 0ae97ae..3abc84e 100644
find_package(Boost COMPONENTS date_time filesystem python${BOOSTPY} numpy${BOOSTPY} program_options system unit_test_framework REQUIRED) find_package(Boost COMPONENTS date_time filesystem python${BOOSTPY} numpy${BOOSTPY} program_options system unit_test_framework REQUIRED)
include_directories(${Boost_INCLUDE_DIR}) include_directories(${Boost_INCLUDE_DIR})
@@ -198,7 +199,7 @@ set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} @@ -236,7 +237,7 @@ set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES}
${CASACORE_LIBRARIES} ${CASACORE_LIBRARIES}
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${EXTRA_LIBRARIES} ${EXTRA_LIBRARIES}
...@@ -115,19 +138,18 @@ index 0ae97ae..3abc84e 100644 ...@@ -115,19 +138,18 @@ index 0ae97ae..3abc84e 100644
Threads::Threads) Threads::Threads)
diff --git a/PythonDPPP/CMakeLists.txt b/PythonDPPP/CMakeLists.txt diff --git a/PythonDPPP/CMakeLists.txt b/PythonDPPP/CMakeLists.txt
index 9194dc7..afd8545 100644 index 72fe59a..7e4bcad 100644
--- a/PythonDPPP/CMakeLists.txt --- a/PythonDPPP/CMakeLists.txt
+++ b/PythonDPPP/CMakeLists.txt +++ b/PythonDPPP/CMakeLists.txt
@@ -1,5 +1,7 @@ @@ -1,5 +1,5 @@
# If Boost-Python3 found, build this package. Otherwise give a warning. -# If Boost-Python3 found, build this package. Otherwise give a warning.
-if(${Boost_PYTHON3_FOUND}) -if(${Boost_PYTHON${BOOSTPY}_FOUND})
+#if(${Boost_PYTHON${boostpy}_FOUND}) +# We set Boost-python as required in toplevel build file.
+# We set Boost-python as reuired in toplevel build file.
+if(TRUE) +if(TRUE)
include(PythonInstall) include(PythonInstall)
@@ -25,16 +27,7 @@ if(${Boost_PYTHON3_FOUND}) @@ -25,20 +25,7 @@ if(${Boost_PYTHON${BOOSTPY}_FOUND})
# Install Python modules # Install Python modules
python_install(__init__.py DESTINATION lofar/pythondppp) python_install(__init__.py DESTINATION lofar/pythondppp)
...@@ -135,14 +157,17 @@ index 9194dc7..afd8545 100644 ...@@ -135,14 +157,17 @@ index 9194dc7..afd8545 100644
- find_package(PythonLibs 3 REQUIRED) - find_package(PythonLibs 3 REQUIRED)
- include_directories(${PYTHON_INCLUDE_DIRS}) - include_directories(${PYTHON_INCLUDE_DIRS})
- -
- if(${PYTHON_VERSION_MAJOR} EQUAL 2)
- find_package(Casacore COMPONENTS python) - find_package(Casacore COMPONENTS python)
- - else()
- find_package(Boost REQUIRED COMPONENTS python3) - find_package(Casacore COMPONENTS python3)
- endif()
+ find_package(Casacore COMPONENTS python3)
- find_package(Boost REQUIRED COMPONENTS python${BOOSTPY})
- include_directories(${Boost_INCLUDE_DIR}) - include_directories(${Boost_INCLUDE_DIR})
- -
# add_subdirectory(test) # add_subdirectory(test)
-else() -else()
- message (WARNING, " Boost-Python not found; PythonDPPP will not be built.") - message (WARNING, " Boost-Python not found; PythonDPPP will not be built.")
+#else()
+# message (WARNING, " Boost-Python not found; PythonDPPP will not be built.")
endif() endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment