Skip to content

Commit

Permalink
Replaced optional compilation with #if ATLAS_HAVE_EIGEN in source fil…
Browse files Browse the repository at this point in the history
…e and header.
  • Loading branch information
odlomax committed Nov 30, 2023
1 parent 6b43f84 commit 35611a8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
11 changes: 2 additions & 9 deletions src/atlas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ interpolation/method/knn/KNearestNeighboursBase.cc
interpolation/method/knn/KNearestNeighboursBase.h
interpolation/method/knn/NearestNeighbour.cc
interpolation/method/knn/NearestNeighbour.h
interpolation/method/sphericalvector/SphericalVector.h
interpolation/method/sphericalvector/SphericalVector.cc
interpolation/method/structured/Cubic2D.cc
interpolation/method/structured/Cubic2D.h
interpolation/method/structured/Cubic3D.cc
Expand Down Expand Up @@ -669,15 +671,6 @@ interpolation/nonlinear/NonLinear.cc
interpolation/nonlinear/NonLinear.h
)

if (atlas_HAVE_EIGEN)

list (APPEND atlas_interpolation_srcs
interpolation/method/sphericalvector/SphericalVector.h
interpolation/method/sphericalvector/SphericalVector.cc
)

endif()

list( APPEND atlas_linalg_srcs
linalg/Indexing.h
linalg/Introspection.h
Expand Down
8 changes: 4 additions & 4 deletions src/atlas/interpolation/method/MethodFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* nor does it submit to any jurisdiction.
*/

#include "atlas/library/defines.h"
#include "MethodFactory.h"

// for static linking
Expand All @@ -16,6 +17,9 @@
#include "knn/GridBoxMaximum.h"
#include "knn/KNearestNeighbours.h"
#include "knn/NearestNeighbour.h"
#if ATLAS_HAVE_EIGEN
#include "sphericalvector/SphericalVector.h"
#endif
#include "structured/Cubic2D.h"
#include "structured/Cubic3D.h"
#include "structured/Linear2D.h"
Expand All @@ -25,10 +29,6 @@
#include "unstructured/FiniteElement.h"
#include "unstructured/UnstructuredBilinearLonLat.h"

#if ATLAS_HAVE_EIGEN
#include "sphericalvector/SphericalVector.h"
#endif

namespace atlas {
namespace interpolation {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/

#include "atlas/library/defines.h"
#if ATLAS_HAVE_EIGEN

#include <cmath>
#include <tuple>

Expand Down Expand Up @@ -237,3 +240,5 @@ void SphericalVector::interpolate_vector_field(const Field& sourceField,
} // namespace method
} // namespace interpolation
} // namespace atlas

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/

#include "atlas/library/defines.h"
#if ATLAS_HAVE_EIGEN

#pragma once

#include <complex>
Expand Down Expand Up @@ -92,3 +95,5 @@ class SphericalVector : public Method {
} // namespace method
} // namespace interpolation
} // namespace atlas

#endif

0 comments on commit 35611a8

Please sign in to comment.