summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/AutoExportDll/AutoExport.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-20 15:26:55 (GMT)
committerBrad King <brad.king@kitware.com>2016-07-21 15:05:22 (GMT)
commit13a6ff31becea16d567b23abc68bfa8aa75365ce (patch)
treec7a0005b500f8f0c52c49008bc7e272821cd170b /Tests/RunCMake/AutoExportDll/AutoExport.cmake
parentdf14a98e9c4af316cd5e75d6af8cc7b75da2db8f (diff)
downloadCMake-13a6ff31becea16d567b23abc68bfa8aa75365ce.zip
CMake-13a6ff31becea16d567b23abc68bfa8aa75365ce.tar.gz
CMake-13a6ff31becea16d567b23abc68bfa8aa75365ce.tar.bz2
VS: Fix WINDOWS_EXPORT_ALL_SYMBOLS for object libraries
Teach Visual Studio generators to include object files from object libraries in the list of objects whose symbols are to be exported. The Makefile and Ninja generators already did this. Update the test to cover this case. Reported-by: Bertrand Bellenot <Bertrand.Bellenot@cern.ch>
Diffstat (limited to 'Tests/RunCMake/AutoExportDll/AutoExport.cmake')
-rw-r--r--Tests/RunCMake/AutoExportDll/AutoExport.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/RunCMake/AutoExportDll/AutoExport.cmake b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
index bdddb38..d37e896 100644
--- a/Tests/RunCMake/AutoExportDll/AutoExport.cmake
+++ b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
@@ -2,7 +2,9 @@ project(autoexport)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${autoexport_BINARY_DIR}/bin)
add_subdirectory(sub)
-add_library(autoexport SHARED hello.cxx world.cxx foo.c)
+add_library(objlib OBJECT objlib.c)
+set_property(TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
+add_library(autoexport SHARED hello.cxx world.cxx foo.c $<TARGET_OBJECTS:objlib>)
add_executable(say say.cxx)
if(MSVC)