Skip to content
Snippets Groups Projects
Verified Commit fed93276 authored by Maik Nijhuis's avatar Maik Nijhuis
Browse files

Use xtensor-blas and xtensor-fftw via FetchXTensor.cmake

parent c91aede1
No related branches found
No related tags found
1 merge request!290Use xtensor-blas and xtensor-fftw via FetchXTensor.cmake
Pipeline #52397 passed with warnings
...@@ -16,9 +16,3 @@ ...@@ -16,9 +16,3 @@
[submodule "external/oskar"] [submodule "external/oskar"]
path = external/oskar path = external/oskar
url = https://gitlab.com/ska-telescope/sim/oskar.git url = https://gitlab.com/ska-telescope/sim/oskar.git
[submodule "external/xtensor-blas"]
path = external/xtensor-blas
url = https://github.com/xtensor-stack/xtensor-blas.git
[submodule "external/xtensor-fftw"]
path = external/xtensor-fftw
url = https://github.com/xtensor-stack/xtensor-fftw.git
...@@ -102,6 +102,7 @@ find_package(Casacore REQUIRED COMPONENTS casa ms tables measures fits) ...@@ -102,6 +102,7 @@ find_package(Casacore REQUIRED COMPONENTS casa ms tables measures fits)
include_directories(SYSTEM ${CASACORE_INCLUDE_DIRS}) include_directories(SYSTEM ${CASACORE_INCLUDE_DIRS})
# Fetch XTensor and related libraries. # Fetch XTensor and related libraries.
set(XTENSOR_LIBRARIES xtl xtensor xtensor-blas xtensor-fftw)
include(external/aocommon/CMake/FetchXTensor.cmake) include(external/aocommon/CMake/FetchXTensor.cmake)
# Find and include Boost headers (boost::math required for MWA beam) # Find and include Boost headers (boost::math required for MWA beam)
......
...@@ -22,13 +22,8 @@ add_library( ...@@ -22,13 +22,8 @@ add_library(
# Compilation must therefore generate relocatable code # Compilation must therefore generate relocatable code
set_property(TARGET aterms PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET aterms PROPERTY POSITION_INDEPENDENT_CODE ON)
# Link to XTensor, which is loaded using FetchXTensor.cmake. # Link to XTensor libraries, which are loaded using FetchXTensor.cmake.
target_link_libraries(aterms xtensor) target_link_libraries(aterms xtensor xtl xtensor-blas xtensor-fftw)
# Add the XTensor dependencies that use submodules.
target_include_directories(
aterms SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/external/xtensor-blas/include
${CMAKE_SOURCE_DIR}/external/xtensor-fftw/include)
install( install(
FILES atermconfig.h FILES atermconfig.h
......
...@@ -104,16 +104,18 @@ add_test(NAME download_mocks ...@@ -104,16 +104,18 @@ add_test(NAME download_mocks
set_tests_properties(download_mocks PROPERTIES FIXTURES_SETUP mocks) set_tests_properties(download_mocks PROPERTIES FIXTURES_SETUP mocks)
add_executable(unittests ${TEST_FILENAMES}) add_executable(unittests ${TEST_FILENAMES})
target_link_libraries(unittests everybeam ${Boost_LIBRARIES} schaapcommon target_link_libraries(
xtensor) unittests
everybeam
${Boost_LIBRARIES}
schaapcommon
xtensor
xtl
xtensor-fftw)
# Required to get the config.h header # Required to get the config.h header
target_include_directories(unittests PRIVATE ${CMAKE_BINARY_DIR}) target_include_directories(unittests PRIVATE ${CMAKE_BINARY_DIR})
# Add the XTensor dependencies that use submodules.
target_include_directories(
unittests SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/external/xtensor-fftw/include)
# Add test for automatically (re)building unittests if needed. # Add test for automatically (re)building unittests if needed.
add_test(NAME buildunittests COMMAND ${CMAKE_COMMAND} --build add_test(NAME buildunittests COMMAND ${CMAKE_COMMAND} --build
${CMAKE_BINARY_DIR} --target unittests) ${CMAKE_BINARY_DIR} --target unittests)
......
...@@ -46,7 +46,7 @@ if(CFITSIO_FOUND) ...@@ -46,7 +46,7 @@ if(CFITSIO_FOUND)
tElementBeamOSKARDipole tElementBeamOSKARSphericalWave) tElementBeamOSKARDipole tElementBeamOSKARSphericalWave)
foreach(TEST ${CFITSIO_TESTS}) foreach(TEST ${CFITSIO_TESTS})
add_executable(${TEST} ${TEST}.cc) add_executable(${TEST} ${TEST}.cc)
target_link_libraries(${TEST} PUBLIC beamhelper xtensor) target_link_libraries(${TEST} PUBLIC beamhelper xtensor xtl)
target_include_directories(${TEST} PUBLIC ${CMAKE_BINARY_DIR}) target_include_directories(${TEST} PUBLIC ${CMAKE_BINARY_DIR})
# These are not "tests" in the strict sense of the word, so don't add them to test stack # These are not "tests" in the strict sense of the word, so don't add them to test stack
......
Subproject commit 8e328a112239ad57200db62b450f9c05fc13f390 Subproject commit 96a6759920f72e43d086e309d8d291fd8f5546b5
Subproject commit 66ab0fa7cd53d0b914f89d4d451576a9240ea457
Subproject commit e6be85a376624da10629b6525c81759e02020308
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment