Skip to content
Snippets Groups Projects
Commit 5b3d64b1 authored by Francesco Gasperin fdg@hs.uni-hamburg.de's avatar Francesco Gasperin fdg@hs.uni-hamburg.de
Browse files

update

parent 860a6ab9
No related branches found
No related tags found
No related merge requests found
......@@ -82,15 +82,50 @@ index 173f995..c15bbab 100644
# Parse arguments.
# apart from the python files list, there are two additional arguments
diff --git a/PythonDPPP/CMakeLists.txt b/PythonDPPP/CMakeLists.txt
index 9194dc7..c8284a8 100644
--- a/PythonDPPP/CMakeLists.txt
+++ b/PythonDPPP/CMakeLists.txt
@@ -1,5 +1,5 @@
# If Boost-Python3 found, build this package. Otherwise give a warning.
-if(${Boost_PYTHON3_FOUND})
+if(${Boost_PYTHON${boostpy}_FOUND})
include(PythonInstall)
@@ -25,15 +25,6 @@ if(${Boost_PYTHON3_FOUND})
# Install Python modules
python_install(__init__.py DESTINATION lofar/pythondppp)
- find_package(PythonInterp REQUIRED)
- find_package(PythonLibs 3 REQUIRED)
- include_directories(${PYTHON_INCLUDE_DIRS})
-
- find_package(Casacore COMPONENTS python)
-
- find_package(Boost REQUIRED COMPONENTS python3)
- include_directories(${Boost_INCLUDE_DIR})
-
# add_subdirectory(test)
else()
message (WARNING, " Boost-Python not found; PythonDPPP will not be built.")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 515aae1..671419d 100644
index 9194dc7..c8284a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,10 +44,40 @@ endif(IDGAPI_LIBRARIES AND IDGAPI_INCLUDE_DIRS)
@@ -44,15 +44,49 @@
find_package(CFITSIO REQUIRED)
-#Prevent accidentally finding old BoostConfig.cmake file from casapy
-find_package(PythonLibs 3 REQUIRED)
-find_package(PythonInterp REQUIRED)
-message(STATUS "Using python version ${PYTHON_VERSION_STRING}")
+#find_package(PythonLibs 3 REQUIRED)
+#find_package(PythonInterp REQUIRED)
+#message(STATUS "Using python version ${PYTHON_VERSION_STRING}")
#Prevent accidentally finding old BoostConfig.cmake file from casapy
+
+# An attempt at common logic for Python and Boost:
+# 0. Try CMake 3.12's FindPython, fall back to FindPythonInterp/Libs.
+# 1. Use a default Python being found (environment should provide that).
......@@ -114,7 +149,11 @@ index 515aae1..671419d 100644
+endif()
+
set(Boost_NO_BOOST_CMAKE ON)
-find_package(Boost COMPONENTS date_time filesystem python3 program_options system unit_test_framework REQUIRED)
-set(BOOSTPY ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
-find_package(Boost COMPONENTS date_time filesystem python${BOOSTPY} numpy${BOOSTPY} program_options system unit_test_framework REQUIRED)
+#set(BOOSTPY ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
+#find_package(Boost COMPONENTS date_time filesystem python${BOOSTPY} numpy${BOOSTPY} program_options system unit_test_framework REQUIRED)
+
+set(boostcomp date_time filesystem program_options system unit_test_framework)
+set(boostpy ${Python_VERSION_MAJOR}${Python_VERSION_MINOR})
+find_package(Boost 1.67.0 COMPONENTS ${boostcomp} python${boostpy})
......@@ -129,51 +168,17 @@ index 515aae1..671419d 100644
find_path(LOFAR_STATION_RESPONSE_DIR NAMES StationResponse/Station.h)
find_library(LOFAR_STATION_RESPONSE_LIB stationresponse)
@@ -165,8 +195,6 @@ set(DPPP_OBJECT $<TARGET_OBJECTS:DPPP_OBJ>)
#
# Dependencies of AOFlagger
#
-find_package(PythonLibs 3 REQUIRED)
-find_package(PythonInterp REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(PNG REQUIRED)
find_library(FFTW3_LIB fftw3 REQUIRED)
@@ -193,9 +221,9 @@ set(AOFLAGGERSTEP_OBJECT $<TARGET_OBJECTS:AOFlaggerStep_OBJ>)
@@ -196,9 +230,11 @@
set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES}
${AOFLAGGER_LIB}
${CASACORE_LIBRARIES}
- ${Boost_DATE_TIME_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PYTHON3_LIBRARY}
- ${Boost_LIBRARIES}
+ #${Boost_LIBRARIES}
+ Boost::date_time Boost::filesystem Boost::system Boost::program_options Boost::python${boostpy}
${EXTRA_LIBRARIES}
- ${PYTHON_LIBRARIES}
+ #${PYTHON_LIBRARIES}
+ ${Python_LIBRARIES}
${IDGAPI_LIBRARIES}
Threads::Threads)
diff --git a/PythonDPPP/CMakeLists.txt b/PythonDPPP/CMakeLists.txt
index 9194dc7..c8284a8 100644
--- a/PythonDPPP/CMakeLists.txt
+++ b/PythonDPPP/CMakeLists.txt
@@ -1,5 +1,5 @@
# If Boost-Python3 found, build this package. Otherwise give a warning.
-if(${Boost_PYTHON3_FOUND})
+if(${Boost_PYTHON${boostpy}_FOUND})
include(PythonInstall)
@@ -25,15 +25,6 @@ if(${Boost_PYTHON3_FOUND})
# Install Python modules
python_install(__init__.py DESTINATION lofar/pythondppp)
- find_package(PythonInterp REQUIRED)
- find_package(PythonLibs 3 REQUIRED)
- include_directories(${PYTHON_INCLUDE_DIRS})
-
- find_package(Casacore COMPONENTS python)
-
- find_package(Boost REQUIRED COMPONENTS python3)
- include_directories(${Boost_INCLUDE_DIR})
-
# add_subdirectory(test)
else()
message (WARNING, " Boost-Python not found; PythonDPPP will not be built.")
......@@ -479,7 +479,7 @@ if [ ! -e $prefix/.done ]; then
if test -d src; then
echo "Using existing source."
else
git clone https://gitlab.com/astron-idg/idg.git presrc &&
git clone -b master https://gitlab.com/astron-idg/idg.git presrc &&
echo "Patching build (for BLAS, Boost, Python, usually) ..." &&
(cd presrc && patch -Np1 < "$scriptdir/idg-buildfix.patch" ) &&
mv presrc src
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment