diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ec210da..aab89753 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,7 @@ configure_file("${PROJECT_SOURCE_DIR}/cppcheck.suppress.in" ${PROJECT_BINARY_DIR}/cppcheck.suppress) gz_configure_build(QUIT_IF_BUILD_ERRORS + HIDE_SYMBOLS_BY_DEFAULT COMPONENTS av events geospatial graphics io profiler testing) #============================================================================ diff --git a/profiler/src/RemoteryProfilerImpl.cc b/profiler/src/RemoteryProfilerImpl.cc index b233adfe..7f1954a4 100644 --- a/profiler/src/RemoteryProfilerImpl.cc +++ b/profiler/src/RemoteryProfilerImpl.cc @@ -16,6 +16,7 @@ */ #include "gz/common/config.hh" +#include #include "RemoteryProfilerImpl.hh" #include "gz/common/Console.hh" @@ -24,6 +25,7 @@ using namespace gz; using namespace common; +GZ_COMMON_PROFILER_VISIBLE std::string rmtErrorToString(rmtError error) { switch (error) { case RMT_ERROR_NONE: diff --git a/src/SignalHandler.cc b/src/SignalHandler.cc index 7ad81d81..07b6d054 100644 --- a/src/SignalHandler.cc +++ b/src/SignalHandler.cc @@ -31,7 +31,7 @@ using namespace gz; using namespace common; // A wrapper for the sigaction sa_handler. -std::map> gOnSignalWrappers; +GZ_COMMON_VISIBLE std::map> gOnSignalWrappers; std::mutex gWrapperMutex; ///////////////////////////////////////////////// diff --git a/testing/include/gz/common/testing/CMakeTestPaths.hh b/testing/include/gz/common/testing/CMakeTestPaths.hh index 362ae295..19fef93f 100644 --- a/testing/include/gz/common/testing/CMakeTestPaths.hh +++ b/testing/include/gz/common/testing/CMakeTestPaths.hh @@ -28,21 +28,21 @@ namespace gz::common::testing /// /// It is not intended that users will directly construct this, but rather /// utilize the TestPathFactory. -class CMakeTestPaths: public TestPaths +class GZ_COMMON_TESTING_VISIBLE CMakeTestPaths: public TestPaths { - /// \brief Constructor from TestPaths - public: using TestPaths::TestPaths; + /// \brief Constructor + /// \param[in] _projectSourcePath Path to the root of the project source + public: explicit CMakeTestPaths( + const std::string &_projectSourcePath = kTestingProjectSourceDir); /// \brief Destructor - public: GZ_COMMON_TESTING_VISIBLE ~CMakeTestPaths() override; + public: ~CMakeTestPaths() override; /// Documentation inherited - public: bool GZ_COMMON_TESTING_VISIBLE - ProjectSourcePath(std::string &_sourceDir) override; + public: bool ProjectSourcePath(std::string &_sourceDir) override; /// Documentation inherited - public: bool GZ_COMMON_TESTING_VISIBLE - TestTmpPath(std::string &_tmpDir) override; + public: bool TestTmpPath(std::string &_tmpDir) override; }; } // namespace gz::common::testing #endif // GZ_COMMON_TESTING_CMAKETESTPATHS_HH_ diff --git a/testing/include/gz/common/testing/TestPaths.hh b/testing/include/gz/common/testing/TestPaths.hh index ce887f51..4a15b6ba 100644 --- a/testing/include/gz/common/testing/TestPaths.hh +++ b/testing/include/gz/common/testing/TestPaths.hh @@ -26,6 +26,8 @@ #include "gz/common/testing/Export.hh" +#include + #ifndef TESTING_PROJECT_SOURCE_DIR #define TESTING_PROJECT_SOURCE_DIR "" #endif @@ -59,32 +61,30 @@ enum class GZ_COMMON_TESTING_VISIBLE BuildType /// /// It is intended that there is an implementation of this interface for /// each relevant buildsystem. -class TestPaths +class GZ_COMMON_TESTING_VISIBLE TestPaths { /// \brief Constructor /// \param[in] _projectSourcePath Path to the root of the project source - public: GZ_COMMON_TESTING_VISIBLE - explicit TestPaths(const std::string &_projectSourcePath = - kTestingProjectSourceDir); + public: explicit TestPaths( + const std::string &_projectSourcePath = kTestingProjectSourceDir); /// \brief Destructor - public: GZ_COMMON_TESTING_VISIBLE - virtual ~TestPaths() = 0; + public: virtual ~TestPaths(); /// brief Populate the path to the root project source directory /// \param[out] _sourceDir path to the root project source directory /// \return True if path successfully found and set, false otherwise - public: virtual bool GZ_COMMON_TESTING_VISIBLE - ProjectSourcePath(std::string &_sourceDir) = 0; + public: virtual bool ProjectSourcePath(std::string &_sourceDir) = 0; /// \brief Populate the path to a temporary directory /// \param[out] _tmpDir path to the root temporary directory /// \return True if path successfully found and set, false otherwise - public: virtual bool GZ_COMMON_TESTING_VISIBLE - TestTmpPath(std::string &_tmpDir) = 0; + public: virtual bool TestTmpPath(std::string &_tmpDir) = 0; +GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief Path to the root of the project source protected: std::string projectSourcePath; +GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; ////////////////////////////////////////////////// diff --git a/testing/src/CMakeTestPaths.cc b/testing/src/CMakeTestPaths.cc index f17d26b8..f0b84250 100644 --- a/testing/src/CMakeTestPaths.cc +++ b/testing/src/CMakeTestPaths.cc @@ -20,6 +20,12 @@ namespace gz::common::testing { +////////////////////////////////////////////////// +CMakeTestPaths::CMakeTestPaths(const std::string &_projectSourcePath) + : TestPaths(_projectSourcePath) +{ +} + ////////////////////////////////////////////////// CMakeTestPaths::~CMakeTestPaths() = default;