Browse Source

ENH: try to fix test on watcom

Bill Hoffman 19 years ago
parent
commit
113231d182
3 changed files with 11 additions and 1 deletions
  1. 1 0
      Tests/CustComDepend/CMakeLists.txt
  2. 9 0
      Tests/CustComDepend/bar.h
  3. 1 1
      Tests/CustComDepend/foo.cxx

+ 1 - 0
Tests/CustComDepend/CMakeLists.txt

@@ -1,4 +1,5 @@
 project(CustComDepend)
+include_directories("${CustComDepend_SOURCE_DIR}")
 add_definitions(-D_CRT_SECURE_NO_DEPRECATE=1)
 set(EXECUTABLE_OUTPUT_PATH ${CustComDepend_BINARY_DIR}/bin)
 add_executable(foo foo.cxx)

+ 9 - 0
Tests/CustComDepend/bar.h

@@ -0,0 +1,9 @@
+#ifdef _WIN32
+#  ifdef bar_EXPORTS
+#    define BAR_EXPORT  __declspec( dllexport )
+#  else
+#    define BAR_EXPORT  __declspec( dllimport )
+#  endif
+#else
+#  define BAR_EXPORT 
+#endif

+ 1 - 1
Tests/CustComDepend/foo.cxx

@@ -8,7 +8,7 @@ int main(int ac, char** av)
     {
     return -1;
     }
-  fprintf(fout, "int bar(){ return 10;}\n");
+  fprintf(fout, "#include <bar.h>\nBAR_EXPORT int bar(){ return 10;}\n");
   fclose(fout);
   return 0;
 }