arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-1159: [C++] Use dllimport for visibility when not building Arrow library
Date Tue, 27 Jun 2017 20:06:48 GMT
Repository: arrow
Updated Branches:
  refs/heads/master b06522870 -> a58893882


ARROW-1159: [C++] Use dllimport for visibility when not building Arrow library

This should fix the linking issues currently in https://ci.appveyor.com/project/ApacheSoftwareFoundation/parquet-cpp/build/1.0.173/job/90ahlb7eoxlch3yj

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #789 from wesm/ARROW-1154-post and squashes the following commits:

985cedee [Wes McKinney] Use dllimport for visibility when not building Arrow library, this
enables static members to be visible from inline functions like in cpu-info.h


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/a5889388
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/a5889388
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/a5889388

Branch: refs/heads/master
Commit: a58893882ac8acd1ac4a5036685cbf09a9a09673
Parents: b065228
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Tue Jun 27 16:06:43 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Tue Jun 27 16:06:43 2017 -0400

----------------------------------------------------------------------
 cpp/cmake_modules/SetupCxxFlags.cmake | 4 ++++
 cpp/src/arrow/util/visibility.h       | 6 ++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/a5889388/cpp/cmake_modules/SetupCxxFlags.cmake
----------------------------------------------------------------------
diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake
index e210655..6e92c4b 100644
--- a/cpp/cmake_modules/SetupCxxFlags.cmake
+++ b/cpp/cmake_modules/SetupCxxFlags.cmake
@@ -30,6 +30,10 @@ if (MSVC)
   # insecure, like std::getenv
   add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 
+  # Use __declspec(dllexport) during library build, other users of the Arrow
+  # headers will see dllimport
+  add_definitions(-DARROW_EXPORTING)
+
   if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     # clang-cl
     set(CXX_COMMON_FLAGS "-EHsc")

http://git-wip-us.apache.org/repos/asf/arrow/blob/a5889388/cpp/src/arrow/util/visibility.h
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/util/visibility.h b/cpp/src/arrow/util/visibility.h
index 0018ce0..ea78e57 100644
--- a/cpp/src/arrow/util/visibility.h
+++ b/cpp/src/arrow/util/visibility.h
@@ -24,7 +24,13 @@
 #else
 #pragma GCC diagnostic ignored "-Wattributes"
 #endif
+
+#ifdef ARROW_EXPORTING
 #define ARROW_EXPORT __declspec(dllexport)
+#else
+#define ARROW_EXPORT __declspec(dllimport)
+#endif
+
 #define ARROW_NO_EXPORT
 #else  // Not Windows
 #ifndef ARROW_EXPORT


Mime
View raw message