Skip to content

Commit

Permalink
COMP: Fix inconsistent dll linkage error on windows
Browse files Browse the repository at this point in the history
This commit addresses a regression introduced in 53edc73 (COMP: Fix
configuration updating ITKSetStandardCompilerFlags) and disable the
setting of BUILD_SHARED_LIBS. This caused the ShapePopulationViewer module
to be incorrectly built statically.

Co-authored-by: Jared Vicory <jared.vicory@kitware.com>
  • Loading branch information
jcfr and vicory committed Jan 13, 2020
1 parent af15572 commit aecbfec
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions CMake/ITKSetStandardCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -240,18 +240,18 @@ macro(check_compiler_platform_flags)
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-auto-import")
endif()
else()
# if CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS is on, then
# BUILD_SHARED_LIBS works as it would on other systems
if(NOT CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS)
if(BUILD_SHARED_LIBS)
set(ITK_LIBRARY_BUILD_TYPE "SHARED")
else()
set(ITK_LIBRARY_BUILD_TYPE "STATIC")
endif()
# turn off BUILD_SHARED_LIBS as ITK_LIBRARY_BUILD_TYPE
# is used on the libraries that have markup.
set(BUILD_SHARED_LIBS OFF)
endif()
# # if CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS is on, then
# # BUILD_SHARED_LIBS works as it would on other systems
# if(NOT CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS)
# if(BUILD_SHARED_LIBS)
# set(ITK_LIBRARY_BUILD_TYPE "SHARED")
# else()
# set(ITK_LIBRARY_BUILD_TYPE "STATIC")
# endif()
# # turn off BUILD_SHARED_LIBS as ITK_LIBRARY_BUILD_TYPE
# # is used on the libraries that have markup.
# set(BUILD_SHARED_LIBS OFF)
# endif()
endif()
endif()
#-----------------------------------------------------------------------------
Expand Down

0 comments on commit aecbfec

Please sign in to comment.