This changes the CMake-defined macro when building a Windows DLL to an
implementation-reserved identifier.
diff --git a/include/__config b/include/__config
index a45b02d..faf663a 100644
--- a/include/__config
+++ b/include/__config
@@ -123,7 +123,7 @@
// only really useful for a DLL
#ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally...
-# ifdef cxx_EXPORTS
+# ifdef _LIBCPP_BUILD_SHARED
# define _LIBCPP_HIDDEN
# define _LIBCPP_FUNC_VIS __declspec(dllexport)
# define _LIBCPP_TYPE_VIS __declspec(dllexport)
diff --git a/include/new b/include/new
index 31bb598..9c5d778 100644
--- a/include/new
+++ b/include/new
@@ -114,7 +114,7 @@ _LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
} // std
-#if defined(_WIN32) && !defined(cxx_EXPORTS)
+#if defined(_WIN32) && !defined(_LIBCPP_BUILD_SHARED)
# define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS_ONLY
#else
# define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 9f28f68..a65f8ce 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -93,6 +93,7 @@ set_target_properties(cxx
OUTPUT_NAME "c++"
VERSION "1.0"
SOVERSION "1"
+ DEFINE_SYMBOL _LIBCPP_BUILD_SHARED
)
install(TARGETS cxx
--
1.8.1.msysgit.1
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits