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.
This commit is contained in:
Brad King 2013-07-16 14:08:50 -04:00
parent 574fec97fd
commit 295a42c96c
1 changed files with 1 additions and 0 deletions

View File

@ -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>"