浏览代码

Fix ExportImport test cmp0022NEW build on Watcom

The test uses generate_export_header(cmp0022OLD ...) to generate the
cmp0022_export.h header used by both cmp0022OLD and cmp0022NEW.  In
the latter the _EXPORTS symbol does not match what the header expects
so the library does not export anything.  The Watcom linker does not
like to create shared libraries that do not export any symbols.

Fix this by setting the DEFINE_SYMBOL property on cmp0022NEW to match
that of cmp0022OLD as the header expects.
Brad King 12 年之前
父节点
当前提交
295a42c96c
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Tests/ExportImport/Export/CMakeLists.txt

+ 1 - 0
Tests/ExportImport/Export/CMakeLists.txt

@@ -240,6 +240,7 @@ target_include_directories(cmp0022OLD PUBLIC
 )
 cmake_policy(SET CMP0022 NEW)
 add_library(cmp0022NEW SHARED cmp0022_vs6_1.cpp)
+set_property(TARGET cmp0022NEW PROPERTY DEFINE_SYMBOL cmp0022OLD_EXPORTS)
 target_include_directories(cmp0022NEW PUBLIC
   "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
   "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/cmp0022>"