diff --git a/DP3-buildfix.patch b/DP3-buildfix.patch index 90f09005e7097603745528e60a9ffad26448f0c5..0caed787ea6207e13ece56eedde2696af9443115 100644 --- a/DP3-buildfix.patch +++ b/DP3-buildfix.patch @@ -1,3 +1,26 @@ +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 index e4689f7..9068fdd 100644 --- a/CMake/FindCasacore.cmake @@ -83,7 +106,7 @@ index 173f995..a1357c7 100644 # Parse arguments. # apart from the python files list, there are two additional arguments diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0ae97ae..3abc84e 100644 +index 2943e17..ae2c423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,13 +44,14 @@ endif(IDGAPI_LIBRARIES AND IDGAPI_INCLUDE_DIRS) @@ -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) 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} ${Boost_LIBRARIES} ${EXTRA_LIBRARIES} @@ -115,19 +138,18 @@ index 0ae97ae..3abc84e 100644 Threads::Threads) diff --git a/PythonDPPP/CMakeLists.txt b/PythonDPPP/CMakeLists.txt -index 9194dc7..afd8545 100644 +index 72fe59a..7e4bcad 100644 --- a/PythonDPPP/CMakeLists.txt +++ b/PythonDPPP/CMakeLists.txt -@@ -1,5 +1,7 @@ - # If Boost-Python3 found, build this package. Otherwise give a warning. --if(${Boost_PYTHON3_FOUND}) -+#if(${Boost_PYTHON${boostpy}_FOUND}) -+# We set Boost-python as reuired in toplevel build file. +@@ -1,5 +1,5 @@ +-# If Boost-Python3 found, build this package. Otherwise give a warning. +-if(${Boost_PYTHON${BOOSTPY}_FOUND}) ++# We set Boost-python as required in toplevel build file. +if(TRUE) include(PythonInstall) -@@ -25,16 +27,7 @@ if(${Boost_PYTHON3_FOUND}) +@@ -25,20 +25,7 @@ if(${Boost_PYTHON${BOOSTPY}_FOUND}) # Install Python modules python_install(__init__.py DESTINATION lofar/pythondppp) @@ -135,14 +157,17 @@ index 9194dc7..afd8545 100644 - find_package(PythonLibs 3 REQUIRED) - include_directories(${PYTHON_INCLUDE_DIRS}) - -- find_package(Casacore COMPONENTS python) -- -- find_package(Boost REQUIRED COMPONENTS python3) +- if(${PYTHON_VERSION_MAJOR} EQUAL 2) +- find_package(Casacore COMPONENTS python) +- else() +- find_package(Casacore COMPONENTS python3) +- endif() ++ find_package(Casacore COMPONENTS python3) + +- find_package(Boost REQUIRED COMPONENTS python${BOOSTPY}) - include_directories(${Boost_INCLUDE_DIR}) - # add_subdirectory(test) -else() - message (WARNING, " Boost-Python not found; PythonDPPP will not be built.") -+#else() -+# message (WARNING, " Boost-Python not found; PythonDPPP will not be built.") endif()