From 52b0579a9b0a6ed82f2e0d20a5696126e29c716b Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Thu, 18 Jul 2019 08:22:41 +0200 Subject: [PATCH] Consistent dllexport.h across gtsam & gtsam_unstable --- gtsam_unstable/CMakeLists.txt | 6 ++++ gtsam_unstable/base/Dummy.h | 2 +- gtsam_unstable/base/dllexport.h | 36 ------------------- gtsam_unstable/discrete/Constraint.h | 2 +- gtsam_unstable/dynamics/PoseRTV.h | 2 +- gtsam_unstable/geometry/BearingS2.h | 2 +- gtsam_unstable/geometry/Pose3Upright.h | 2 +- gtsam_unstable/geometry/SimWall2D.h | 2 +- .../ConcurrentFilteringAndSmoothing.h | 2 +- gtsam_unstable/nonlinear/FixedLagSmoother.h | 2 +- gtsam_unstable/nonlinear/LinearizedFactor.h | 2 +- gtsam_unstable/slam/AHRS.h | 2 +- gtsam_unstable/slam/DummyFactor.h | 2 +- gtsam_unstable/slam/Mechanization_bRn2.h | 2 +- gtsam_unstable/slam/RelativeElevationFactor.h | 2 +- gtsam_unstable/slam/SmartRangeFactor.h | 2 +- 16 files changed, 20 insertions(+), 50 deletions(-) delete mode 100644 gtsam_unstable/base/dllexport.h diff --git a/gtsam_unstable/CMakeLists.txt b/gtsam_unstable/CMakeLists.txt index 65ba4848d..53ba83fad 100644 --- a/gtsam_unstable/CMakeLists.txt +++ b/gtsam_unstable/CMakeLists.txt @@ -44,6 +44,12 @@ foreach(subdir ${gtsam_unstable_subdirs}) add_subdirectory(${subdir}) endforeach(subdir) +# dllexport.h +set(library_name GTSAM_UNSTABLE) # For substitution in dllexport.h.in +configure_file("${GTSAM_SOURCE_DIR}/cmake/dllexport.h.in" "dllexport.h") +list(APPEND gtsam_unstable_srcs "${PROJECT_BINARY_DIR}/dllexport.h") +install(FILES "${PROJECT_BINARY_DIR}/dllexport.h" DESTINATION include/gtsam_unstable) + # assemble gtsam_unstable components set(gtsam_unstable_srcs ${base_srcs} diff --git a/gtsam_unstable/base/Dummy.h b/gtsam_unstable/base/Dummy.h index 14b4b4854..a2f544de5 100644 --- a/gtsam_unstable/base/Dummy.h +++ b/gtsam_unstable/base/Dummy.h @@ -18,7 +18,7 @@ */ #include -#include +#include #include namespace gtsam { diff --git a/gtsam_unstable/base/dllexport.h b/gtsam_unstable/base/dllexport.h deleted file mode 100644 index 903996db4..000000000 --- a/gtsam_unstable/base/dllexport.h +++ /dev/null @@ -1,36 +0,0 @@ -/* ---------------------------------------------------------------------------- - - * GTSAM Copyright 2010, Georgia Tech Research Corporation, - * Atlanta, Georgia 30332-0415 - * All Rights Reserved - * Authors: Frank Dellaert, et al. (see THANKS for the full author list) - - * See LICENSE for the license information - - * -------------------------------------------------------------------------- */ - -/** - * @file dllexport.h - * @brief Symbols for exporting classes and methods from DLLs - * @author Richard Roberts - * @date Mar 9, 2013 - */ - -#ifdef _WIN32 -# ifdef GTSAM_UNSTABLE_EXPORTS -# define GTSAM_UNSTABLE_EXPORT __declspec(dllexport) -# define GTSAM_UNSTABLE_EXTERN_EXPORT __declspec(dllexport) extern -# else -# ifndef GTSAM_UNSTABLE_IMPORT_STATIC -# define GTSAM_UNSTABLE_EXPORT __declspec(dllimport) -# define GTSAM_UNSTABLE_EXTERN_EXPORT __declspec(dllimport) -# else /* GTSAM_UNSTABLE_IMPORT_STATIC */ -# define GTSAM_UNSTABLE_EXPORT -# define GTSAM_UNSTABLE_EXTERN_EXPORT extern -# endif /* GTSAM_UNSTABLE_IMPORT_STATIC */ -# endif /* GTSAM_UNSTABLE_EXPORTS */ -#else /* _WIN32 */ -# define GTSAM_UNSTABLE_EXPORT -# define GTSAM_UNSTABLE_EXTERN_EXPORT extern -#endif - diff --git a/gtsam_unstable/discrete/Constraint.h b/gtsam_unstable/discrete/Constraint.h index 32fb6f1ce..136704c2d 100644 --- a/gtsam_unstable/discrete/Constraint.h +++ b/gtsam_unstable/discrete/Constraint.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include diff --git a/gtsam_unstable/dynamics/PoseRTV.h b/gtsam_unstable/dynamics/PoseRTV.h index 0c00e5d95..b1cfb6f30 100644 --- a/gtsam_unstable/dynamics/PoseRTV.h +++ b/gtsam_unstable/dynamics/PoseRTV.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/gtsam_unstable/geometry/BearingS2.h b/gtsam_unstable/geometry/BearingS2.h index 70a22b9a5..197d4910d 100644 --- a/gtsam_unstable/geometry/BearingS2.h +++ b/gtsam_unstable/geometry/BearingS2.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include diff --git a/gtsam_unstable/geometry/Pose3Upright.h b/gtsam_unstable/geometry/Pose3Upright.h index 9d01e20a5..d833c9cf4 100644 --- a/gtsam_unstable/geometry/Pose3Upright.h +++ b/gtsam_unstable/geometry/Pose3Upright.h @@ -11,7 +11,7 @@ #pragma once -#include +#include #include #include diff --git a/gtsam_unstable/geometry/SimWall2D.h b/gtsam_unstable/geometry/SimWall2D.h index c143bc36d..fd5afbc54 100644 --- a/gtsam_unstable/geometry/SimWall2D.h +++ b/gtsam_unstable/geometry/SimWall2D.h @@ -6,7 +6,7 @@ #pragma once -#include +#include #include #include diff --git a/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h b/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h index 42f82f52f..316db921a 100644 --- a/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h +++ b/gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.h @@ -20,7 +20,7 @@ // \callgraph #pragma once -#include +#include #include #include #include diff --git a/gtsam_unstable/nonlinear/FixedLagSmoother.h b/gtsam_unstable/nonlinear/FixedLagSmoother.h index bef35ffce..362cfae96 100644 --- a/gtsam_unstable/nonlinear/FixedLagSmoother.h +++ b/gtsam_unstable/nonlinear/FixedLagSmoother.h @@ -20,7 +20,7 @@ // \callgraph #pragma once -#include +#include #include #include #include diff --git a/gtsam_unstable/nonlinear/LinearizedFactor.h b/gtsam_unstable/nonlinear/LinearizedFactor.h index ece8cd2f6..128889b82 100644 --- a/gtsam_unstable/nonlinear/LinearizedFactor.h +++ b/gtsam_unstable/nonlinear/LinearizedFactor.h @@ -18,7 +18,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/gtsam_unstable/slam/AHRS.h b/gtsam_unstable/slam/AHRS.h index e15e6e0f7..f22de48cf 100644 --- a/gtsam_unstable/slam/AHRS.h +++ b/gtsam_unstable/slam/AHRS.h @@ -9,7 +9,7 @@ #define AHRS_H_ #include "Mechanization_bRn2.h" -#include +#include #include namespace gtsam { diff --git a/gtsam_unstable/slam/DummyFactor.h b/gtsam_unstable/slam/DummyFactor.h index 9f749e9e5..574efabea 100644 --- a/gtsam_unstable/slam/DummyFactor.h +++ b/gtsam_unstable/slam/DummyFactor.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include namespace gtsam { diff --git a/gtsam_unstable/slam/Mechanization_bRn2.h b/gtsam_unstable/slam/Mechanization_bRn2.h index a228b2347..5a6f1df6d 100644 --- a/gtsam_unstable/slam/Mechanization_bRn2.h +++ b/gtsam_unstable/slam/Mechanization_bRn2.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include namespace gtsam { diff --git a/gtsam_unstable/slam/RelativeElevationFactor.h b/gtsam_unstable/slam/RelativeElevationFactor.h index 3d81fbab3..3507a4492 100644 --- a/gtsam_unstable/slam/RelativeElevationFactor.h +++ b/gtsam_unstable/slam/RelativeElevationFactor.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include diff --git a/gtsam_unstable/slam/SmartRangeFactor.h b/gtsam_unstable/slam/SmartRangeFactor.h index c05633345..5511a0209 100644 --- a/gtsam_unstable/slam/SmartRangeFactor.h +++ b/gtsam_unstable/slam/SmartRangeFactor.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include #include