From 592af4a86be7309a858e04d1e930d8ac6932db18 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 1 Apr 2011 10:28:58 -0700 Subject: uhd: disable visibility=hidden on non-dll platforms (cygwin) --- host/CMakeLists.txt | 6 ++++-- host/include/uhd/config.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 244793b9e..606742865 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -72,8 +72,10 @@ IF(CMAKE_COMPILER_IS_GNUCXX) ADD_DEFINITIONS(-Wextra) #ADD_DEFINITIONS(-pedantic) #ADD_DEFINITIONS(-ansi) - #only export symbols that are declared to be part of the uhd api: - UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN) + IF(NOT WIN32) + #only export symbols that are declared to be part of the uhd api (non dll platforms) + UHD_ADD_OPTIONAL_CXX_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN) + ENDIF(NOT WIN32) ENDIF(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC) diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index 1a04680e9..fdb168950 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -49,7 +49,7 @@ typedef ptrdiff_t ssize_t; #endif //BOOST_MSVC //define cross platform attribute macros -#if defined(BOOST_MSVC) || defined(BOOST_HAS_DECLSPEC) +#if defined(BOOST_HAS_DECLSPEC) #define UHD_EXPORT __declspec(dllexport) #define UHD_IMPORT __declspec(dllimport) #define UHD_INLINE __forceinline -- cgit v1.2.3