Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hamburg LOFAR Toolkit Installation Script
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc
Hamburg LOFAR Toolkit Installation Script
Commits
0ba53032
Commit
0ba53032
authored
Mar 22, 2020
by
Orgis, Dr. Thomas
Browse files
Options
Downloads
Patches
Plain Diff
aoflagger: better search for Boost+Python, use fftw3_threads explicitly
parent
46af6a0e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
aoflagger-buildfix.patch
+67
-0
67 additions, 0 deletions
aoflagger-buildfix.patch
with
67 additions
and
0 deletions
aoflagger-buildfix.patch
0 → 100644
+
67
−
0
View file @
0ba53032
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd1d7c7..37b00ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,14 +29,22 @@
find_package(PNG REQUIRED)
set(Boost_NO_BOOST_CMAKE ON)
#set(PY_VERSION 3)
#find_package(PythonLibs ${PY_VERSION} REQUIRED)
-find_package(PythonInterp REQUIRED)
+#find_package(PythonInterp REQUIRED)
#find_package(PythonLibs ${PYTHON_VERSION_STRING} REQUIRED)
-find_package(PythonLibs 2.7 REQUIRED)
+#find_package(PythonLibs 2.7 REQUIRED)
+# CMake since 3.12 wants you to use this.
+find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
+set(boostpython python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
#message(STATUS "Using python version ${PYTHON_VERSION_STRING}")
# At least the intrusive_ref_counter needs Boost 1.55 (because the header was moved)
-find_package(Boost 1.55.0 REQUIRED COMPONENTS date_time filesystem python system)
+# Bumped to 1.67 to be able to proper python suffix. You may complicate the
+# code again to support older versions, too.
+find_package(Boost 1.67.0 REQUIRED COMPONENTS date_time filesystem ${boostpython} system)
#find_package(Boost REQUIRED COMPONENTS date_time filesystem python-py36 system)
find_library(FFTW3_LIB fftw3 REQUIRED)
+# Not sure if this is needed everywhere, but I get linker
+# errors with missing symbols if not explicitly linking to fftw3_threads.
+find_library(FFTW3_THREADS_LIB fftw3_threads OPTIONAL)
enable_language(Fortran OPTIONAL)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
@@ -53,7 +61,7 @@
include_directories(${FFTW3_INCLUDE_DIR})
if(GSL_INCLUDE_DIR)
include_directories(${GSL_INCLUDE_DIR})
endif(GSL_INCLUDE_DIR)
-include_directories(${PYTHON_INCLUDE_DIRS})
+include_directories(${Python3_INCLUDE_DIRS})
# The following stuff will set the "rpath" correctly, so that
# LD_LIBRARY_PATH doesn't have to be set.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4a36e1c..be7fdcf 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -235,17 +235,17 @@
set(PYTHON_FILES
set(ALL_LIBRARIES
${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_FILESYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
-# ${Boost_PYTHON-PY36_LIBRARIES}
- ${Boost_PYTHON_LIBRARIES}
- ${FFTW3_LIB}
+ Boost::system
+ Boost::filesystem
+ Boost::date_time
+ Boost::${boostpython}
+ ${FFTW3_THREADS_LIB} ${FFTW3_LIB}
${CASACORE_LIBRARIES}
${LAPACK_lapack_LIBRARY}
${CFITSIO_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${PNG_LIBRARIES} ${LIBXML2_LIBRARIES}
- ${PYTHON_LIBRARIES})
+ ${Python3_LIBRARIES})
if(GTKMM_FOUND)
message(STATUS "GTKMM found.")
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment