Przeglądaj źródła

BUG: Fix test that broke on Windows - sharing sources between SHARED and STATIC libraries requires correct export and import decorations in the source code...

David Cole 18 lat temu
rodzic
commit
64f40a2816
2 zmienionych plików z 2 dodań i 7 usunięć
  1. 1 6
      Tests/Framework/bar.cxx
  2. 1 1
      Tests/Framework/foo.cxx

+ 1 - 6
Tests/Framework/bar.cxx

@@ -1,9 +1,4 @@
-#ifdef _WIN32
-#  define CM_TEST_LIB_IMPORT  __declspec( dllimport )
-#else 
-#  define CM_TEST_LIB_IMPORT
-#endif
-CM_TEST_LIB_IMPORT void foo();
+void foo();
 int main()
 {
   foo();

+ 1 - 1
Tests/Framework/foo.cxx

@@ -1,5 +1,5 @@
 #include <stdio.h>
-#ifdef _WIN32
+#if defined(_WIN32) && defined(foo_EXPORTS)
 #  define CM_TEST_LIB_EXPORT  __declspec( dllexport )
 #else 
 #  define CM_TEST_LIB_EXPORT