Skip to content
Snippets Groups Projects
Commit 50652c5b authored by henedler's avatar henedler
Browse files

fix DP3 by commenting the BLAS check - this might break something...

parent 70c071cc
No related branches found
No related tags found
No related merge requests found
diff --git a/CMake/FindCasacore.cmake b/CMake/FindCasacore.cmake
index e4689f7..d6838fa 100644
--- a/CMake/FindCasacore.cmake
+++ b/CMake/FindCasacore.cmake
@@ -232,7 +232,21 @@ else(NOT CASACORE_INCLUDE_DIR)
elseif(${_comp} STREQUAL fits)
casacore_find_package(CFITSIO REQUIRED)
elseif(${_comp} STREQUAL scimath_f)
- casacore_find_package(LAPACK REQUIRED)
+ # If only looking for LAPACK, no library will be added if LAPACK
+ # is part of BLAS, as it is customary nowadays. So look for both
+ # to avoid confusing linker errors on symbols used in headers/templates.
+ if(DEFINED ENV{BLAS_LIBS})
+ set(BLAS_FOUND YES)
+ list(APPEND CASACORE_LIBRARIES $ENV{BLAS_LIBS})
+ else()
+ casacore_find_package(BLAS REQUIRED)
+ endif()
+ if(DEFINED ENV{LAPACK_LIBS})
+ set(LAPACK_FOUND YES)
+ list(APPEND CASACORE_LIBRARIES $ENV{LAPACK_LIBS})
+ else()
+ casacore_find_package(LAPACK REQUIRED)
+ endif()
endif(${_comp} STREQUAL casa)
endforeach(_comp ${_find_components})
endif(NOT CASACORE_INCLUDE_DIR)
diff --git a/CMake/PythonInstall.cmake b/CMake/PythonInstall.cmake
index 173f995..9fb1b57 100644
--- a/CMake/PythonInstall.cmake
+++ b/CMake/PythonInstall.cmake
@@ -24,10 +24,9 @@
# $Id: PythonInstall.cmake 32905 2015-11-17 15:31:54Z schaap $
# Search for the Python interpreter.
-find_package(PythonInterp)
# Derive the Python site-packages installation directory and build directory.
-if(PYTHON_EXECUTABLE)
+if(Python3_EXECUTABLE)
set(_cmd
"from distutils.sysconfig import get_python_lib"
"from os.path import join"
@@ -36,7 +35,7 @@ if(PYTHON_EXECUTABLE)
'site-packages'))"
)
execute_process(
- COMMAND "${PYTHON_EXECUTABLE}" "-c" "${_cmd}"
+ COMMAND "${Python3_EXECUTABLE}" "-c" "${_cmd}"
OUTPUT_VARIABLE _pydir
ERROR_VARIABLE _pyerr
OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -57,7 +56,7 @@ if(PYTHON_EXECUTABLE)
message(STATUS "Build directory for Python extensions: ${PYTHON_BUILD_DIR}")
message(STATUS "Installation directory for Python extensions: ${PYTHON_INSTALL_DIR}")
endif()
-endif(PYTHON_EXECUTABLE)
+endif(Python3_EXECUTABLE)
#
@@ -66,9 +65,9 @@ endif(PYTHON_EXECUTABLE)
macro(python_install)
# Precondition check.
- if(NOT PYTHON_EXECUTABLE)
+ if(NOT Python3_EXECUTABLE)
message(FATAL_ERROR "python_install: Python interpreter not available")
- endif(NOT PYTHON_EXECUTABLE)
+ endif(NOT Python3_EXECUTABLE)
# Parse arguments.
# apart from the python files list, there are two additional arguments
@@ -125,7 +124,7 @@ macro(python_install)
"print('-- Byte-compiling: %s${_inst_dir}/${_py}' % destdir)"
"py_compile.compile('%s${DESTDIR}${_inst_dir}/${_py}' % destdir, doraise=True)")
install(CODE
- "execute_process(COMMAND ${PYTHON_EXECUTABLE} -c \"${_py_code}\"
+ "execute_process(COMMAND ${Python3_EXECUTABLE} -c \"${_py_code}\"
RESULT_VARIABLE _result)
if(NOT _result EQUAL 0)
message(FATAL_ERROR \"Byte-compilation FAILED: \$ENV{DESTDIR}${_inst_dir}/${_py}\")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8025cdb..ac9bb03 100644
index 87ee848e..5656c74a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,13 +46,13 @@ endif(IDGAPI_LIBRARIES AND IDGAPI_INCLUDE_DIRS)
find_package(CFITSIO REQUIRED)
-find_package(PythonLibs 3 REQUIRED)
-find_package(PythonInterp REQUIRED)
-message(STATUS "Using python version ${PYTHON_VERSION_STRING}")
+find_package(Python3 COMPONENTS Interpreter Development)
+message(STATUS "Using python version ${Python3_VERSION}")
+include_directories(${Python3_INCLUDE_DIRS})
#Prevent accidentally finding old BoostConfig.cmake file from casapy
set(Boost_NO_BOOST_CMAKE ON)
-set(BOOSTPY ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
+set(BOOSTPY ${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
find_package(Boost COMPONENTS date_time filesystem python${BOOSTPY} numpy${BOOSTPY} program_options system unit_test_framework REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
@@ -220,7 +220,7 @@ set(EXTRA_LIBRARIES
${AOFLAGGER_LIB}
${CASACORE_LIBRARIES}
${Boost_LIBRARIES}
- ${PYTHON_LIBRARIES}
+ ${Python3_LIBRARIES}
${IDGAPI_LIBRARIES}
Threads::Threads)
diff --git a/PythonDPPP/CMakeLists.txt b/PythonDPPP/CMakeLists.txt
index 72fe59a..69f9fb8 100644
--- a/PythonDPPP/CMakeLists.txt
+++ b/PythonDPPP/CMakeLists.txt
@@ -1,5 +1,4 @@
-# If Boost-Python3 found, build this package. Otherwise give a warning.
-if(${Boost_PYTHON${BOOSTPY}_FOUND})
+if(TRUE)
include(PythonInstall)
@@ -25,20 +24,6 @@ if(${Boost_PYTHON${BOOSTPY}_FOUND})
# Install Python modules
python_install(__init__.py DESTINATION lofar/pythondppp)
@@ -460,8 +460,8 @@ if(LIBDIRAC_FOUND)
endif()
- find_package(PythonInterp REQUIRED)
- find_package(PythonLibs 3 REQUIRED)
- include_directories(${PYTHON_INCLUDE_DIRS})
+ find_package(Casacore COMPONENTS python3)
# Perform the BLAS check from aocommon
-include("${CMAKE_SOURCE_DIR}/external/aocommon/CMake/CheckBLAS.cmake")
-check_blas(LIBRARIES ${DP3_LIBRARIES})
+#include("${CMAKE_SOURCE_DIR}/external/aocommon/CMake/CheckBLAS.cmake")
+#check_blas(LIBRARIES ${DP3_LIBRARIES})
- if(${PYTHON_VERSION_MAJOR} EQUAL 2)
- find_package(Casacore COMPONENTS python)
- else()
- find_package(Casacore COMPONENTS python3)
- endif()
-
- 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.")
endif()
add_subdirectory(base)
......@@ -513,8 +513,8 @@ if [ ! -e $prefix/.done ]; then
if [ "$dp3_version" != "latest" ]; then
( cd presrc && git checkout tags/v$dp3_version )
fi
# echo "Patching build (for BLAS, Boost, Python, usually) ..." &&
#(cd presrc && patch -Np1 < "$scriptdir/DP3-buildfix.patch" ) &&
echo "Patching build (for BLAS, Boost, Python, usually) ..." &&
(cd presrc && patch -Np1 < "$scriptdir/DP3-buildfix.patch" ) &&
mv presrc src
fi &&
mkdir build &&
......
......@@ -14,8 +14,8 @@ casacore_version=3.3.0
dysco_version=1.2.0
pybdsf_version=latest # weird C++ template error with 1.8.12
pycasa_version=3.1.1
wsclean_version=latest #2.10.1
dp3_version=latest
wsclean_version=3.0 #2.10.1
dp3_version=5.2
# This gives us CUDA, gcc, Open MPI and dependencies
# from pkgsrc in separate prefixes.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment