diff --git a/CMakeLists.txt b/CMakeLists.txt index b2ba95a..49f74f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,18 +19,12 @@ include_directories(${CMAKE_SOURCE_DIR}/aocommon/include) find_package(AOFlagger 3 REQUIRED) include_directories(${AOFLAGGER_INCLUDE_DIR}) -find_package(Threads REQUIRED) +find_package(CFITSIO REQUIRED) +include_directories(${CFITSIO_INCLUDE_DIRS}) -find_package(PythonLibs 3 REQUIRED) -find_package(PythonInterp 3 REQUIRED) -message(STATUS "Using python version ${PYTHON_VERSION_STRING}") +find_package(Threads REQUIRED) -set(BOOSTPY ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}) -find_package(Boost 1.55.0 REQUIRED COMPONENTS date_time filesystem python${BOOSTPY}) -set(BOOST_PART_LIBRARIES ${Boost_LIBRARIES}) -# Numpy3 is in some versions of Boost part of python3, so don't 'require' it: -find_package(Boost 1.55.0 COMPONENTS numpy${BOOSTPY}) -set(Boost_LIBRARIES ${BOOST_PART_LIBRARIES} ${Boost_LIBRARIES}) +find_package(Boost 1.55.0 REQUIRED COMPONENTS date_time filesystem) set(CASACORE_MAKE_REQUIRED_EXTERNALS_OPTIONAL TRUE) find_package(Casacore REQUIRED COMPONENTS casa ms tables measures fits scimath scimath_f) @@ -61,8 +55,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(aartfaac2ms main.cpp aartfaac2ms.cpp aartfaacms.cpp averagingwriter.cpp fitsuser.cpp fitswriter.cpp mswriter.cpp progressbar.cpp stopwatch.cpp threadedwriter.cpp) target_link_libraries(aartfaac2ms ${AOFLAGGER_LIB} ${CASACORE_LIBRARIES} - ${Boost_SYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PYTHON_LIBRARIES} - ${PYTHON_LIBRARIES} + ${Boost_SYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY} Threads::Threads) add_executable(afedit afedit.cpp) diff --git a/scripts/docker/Ubuntu20 b/scripts/docker/Ubuntu20 new file mode 100644 index 0000000..66b0968 --- /dev/null +++ b/scripts/docker/Ubuntu20 @@ -0,0 +1,40 @@ +FROM ubuntu:20.04 + +RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \ + apt-get install -y \ + cmake \ + build-essential \ + pkg-config \ + git \ + casacore-data casacore-dev \ + libblas-dev liblapack-dev \ + liblua5.3-dev \ + python3 \ + libpython3-dev \ + libboost-date-time-dev libboost-test-dev \ + libboost-system-dev libboost-filesystem-dev \ + libgtkmm-3.0-dev \ + libcfitsio-dev \ + libfftw3-dev \ + libgsl-dev \ + libhdf5-serial-dev \ + libpng-dev + +RUN \ + mkdir /aoflagger && \ + cd /aoflagger && \ + git clone https://gitlab.com/aroffringa/aoflagger.git src && \ + mkdir /aoflagger/build && \ + cd /aoflagger/build && \ + cmake ../src && \ + make install -j`nproc --all` + +ADD . /src +WORKDIR /src + +RUN \ + mkdir /build && \ + cd /build && \ + cmake ../src && \ + make install -j`nproc --all` && \ + aartfaac2ms --version