Skip to content

Commit 224cad4

Browse files
authored
Merge pull request #5772 from blowekamp/cmake_updates
2 parents 09abbea + 8a4dd39 commit 224cad4

17 files changed

Lines changed: 25 additions & 40 deletions

File tree

CMake/ITKModuleTest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ EM_ASM(
8181
)
8282
target_link_libraries(
8383
${KIT}TestDriver
84-
LINK_PUBLIC
84+
PUBLIC
8585
${KIT_LIBS}
8686
${ITKTestKernel_LIBRARIES}
8787
)

CMake/itkExternal_Eigen3.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
2121
)
2222
endif()
2323

24-
if(CMAKE_SH AND CMAKE_VERSION VERSION_LESS "3.17.0")
25-
# Setting CMAKE_SH is required when using "MinGW Makefiles" generator with CMake < 3.17
26-
# See https://github.com/InsightSoftwareConsortium/ITK/issues/66#issuecomment-424374973
27-
list(APPEND _additional_external_project_args -DCMAKE_SH:PATH=${CMAKE_SH})
28-
endif()
29-
3024
# Because the header-only nature of Eigen3, EIGEN_MPL2_ONLY definition could be leaked outside ITK.
3125
# This would wrongly enforce EIGEN_MPL2_ONLY to other libraries using Eigen.
3226
# We wrap this definition in ITK_USE_EIGEN_MPL2_ONLY, and only enabling it internally in the dashboards and CI,

Modules/Core/Common/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ endif()
242242
### generating libraries
243243
itk_module_add_library(ITKCommon ${ITKCommon_SRCS})
244244

245-
target_link_libraries(ITKCommon LINK_PUBLIC itksys)
245+
target_link_libraries(ITKCommon PUBLIC itksys)
246246

247247
if(UNIX)
248248
target_link_libraries(

Modules/Core/Common/test/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ target_link_options(
220220
"$<$<AND:$<C_COMPILER_ID:AppleClang>,$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,15.0>>:LINKER:-no_warn_duplicate_libraries>"
221221
)
222222
itk_module_target_label(itkMathTest)
223-
target_link_libraries(itkMathTest LINK_PUBLIC ${ITKCommon-Test_LIBRARIES})
223+
target_link_libraries(itkMathTest PUBLIC ${ITKCommon-Test_LIBRARIES})
224224
itk_add_test(NAME itkMathTest COMMAND itkMathTest)
225225

226226
add_executable(itkSystemInformation itkSystemInformation.cxx)
@@ -1843,8 +1843,8 @@ if(ITK_BUILD_SHARED_LIBS AND ITK_DYNAMIC_LOADING)
18431843
buildclienttestlibrary(A SHARED)
18441844
buildclienttestlibrary(B MODULE)
18451845
buildclienttestlibrary(C SHARED)
1846-
target_link_libraries(ITKCommon2TestDriver LINK_PUBLIC ClientTestLibraryA)
1847-
target_link_libraries(ITKCommon2TestDriver LINK_PUBLIC ClientTestLibraryC)
1846+
target_link_libraries(ITKCommon2TestDriver PUBLIC ClientTestLibraryA)
1847+
target_link_libraries(ITKCommon2TestDriver PUBLIC ClientTestLibraryC)
18481848
itk_add_test(
18491849
NAME itkDownCastTest
18501850
COMMAND

Modules/Core/GPUCommon/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ if(ITK_USE_GPU)
1616
write_gpu_kernels("${ITKGPUCommon_Kernels}" ITKGPUCommon_SRCS)
1717

1818
itk_module_add_library(ITKGPUCommon ${ITKGPUCommon_SRCS})
19-
target_link_libraries(ITKGPUCommon LINK_PUBLIC OpenCL::OpenCL)
19+
target_link_libraries(ITKGPUCommon PUBLIC OpenCL::OpenCL)
2020
endif()

Modules/Core/TestKernel/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ itk_module_add_library(ITKTestKernel ${ITKTestKernel_SRCS})
1010

1111
if(NOT DO_NOT_BUILD_ITK_TEST_DRIVER)
1212
add_executable(itkTestDriver itkTestDriver.cxx)
13-
target_link_libraries(itkTestDriver LINK_PRIVATE ${ITKTestKernel_LIBRARIES})
13+
target_link_libraries(itkTestDriver PRIVATE ${ITKTestKernel_LIBRARIES})
1414

1515
itk_module_target_label(itkTestDriver)
1616
itk_module_target_export(itkTestDriver)

Modules/Filtering/FFT/src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW)
1818
if(ITK_USE_FFTWD)
1919
if(NOT ITK_USE_SYSTEM_FFTW)
2020
add_dependencies(ITKFFT fftwd) # Ensure that local FFTW is built before using
21-
target_link_libraries(ITKFFT LINK_PUBLIC ${ITK_FFTWD_LIBRARIES_NAMES})
21+
target_link_libraries(ITKFFT PUBLIC ${ITK_FFTWD_LIBRARIES_NAMES})
2222
else()
2323
target_include_directories(ITKFFT PUBLIC ${FFTW_INCLUDE})
24-
target_link_libraries(ITKFFT LINK_PUBLIC ${FFTWD_LIBRARIES})
24+
target_link_libraries(ITKFFT PUBLIC ${FFTWD_LIBRARIES})
2525
endif()
2626
endif()
2727

2828
if(ITK_USE_FFTWF)
2929
if(NOT ITK_USE_SYSTEM_FFTW)
3030
add_dependencies(ITKFFT fftwf) # Esnsure that local FFTW is build before using
31-
target_link_libraries(ITKFFT LINK_PUBLIC ${ITK_FFTWF_LIBRARIES_NAMES})
31+
target_link_libraries(ITKFFT PUBLIC ${ITK_FFTWF_LIBRARIES_NAMES})
3232
else()
3333
target_include_directories(ITKFFT PUBLIC ${FFTW_INCLUDE})
34-
target_link_libraries(ITKFFT LINK_PUBLIC ${FFTWF_LIBRARIES})
34+
target_link_libraries(ITKFFT PUBLIC ${FFTWF_LIBRARIES})
3535
endif()
3636
endif()
3737
endif()

Modules/IO/ImageBase/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ if(ITK_BUILD_SHARED_LIBS)
918918
)
919919
add_library(FileFreeTestLib MODULE ${FileFreeTest_Source})
920920
itk_module_target_label(FileFreeTestLib)
921-
target_link_libraries(FileFreeTestLib LINK_PUBLIC ${ITKIOImageBase_LIBRARIES})
921+
target_link_libraries(FileFreeTestLib PUBLIC ${ITKIOImageBase_LIBRARIES})
922922
set_property(
923923
TARGET
924924
FileFreeTestLib

Modules/IO/NIFTI/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ add_library(ITKIONIFTI-TestSupport itkNiftiImageIOTestHelper.cxx)
2929
itk_module_target_label(ITKIONIFTI-TestSupport)
3030
target_link_libraries(
3131
ITKIONIFTI-TestSupport
32-
LINK_PUBLIC
32+
PUBLIC
3333
${ITKIONIFTI-Test_LIBRARIES}
3434
)
3535

Modules/IO/TransformMINC/test/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ set(
1515
)
1616

1717
createtestdriver(ITKIOTransformMINC "${ITKIOTransformMINC-Test_LIBRARIES}" "${ITKIOTransformMINCTests}")
18-
target_link_libraries(
19-
ITKIOTransformMINCTestDriver
20-
LINK_PUBLIC
21-
ITKIOTransformBase
22-
)
18+
target_link_libraries(ITKIOTransformMINCTestDriver PUBLIC ITKIOTransformBase)
2319

2420
itk_add_test(
2521
NAME itkIOTransformMINCTest

0 commit comments

Comments
 (0)