Skip to content

Commit cfb62f0

Browse files
committed
COMP: Build ITK with static libraries
To address: CMake Warning (dev) at /Users/vsts/agent/2.148.0/work/1/ITK-build/ITKTargets.cmake:49 (add_library): ADD_LIBRARY called with SHARED option but the target platform does not support dynamic linking. Building a STATIC library instead. This may lead to problems. Call Stack (most recent call first): /Users/vsts/agent/2.148.0/work/1/ITK-build/ITKConfig.cmake:64 (include) CMakeLists.txt:17 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.
1 parent 57b1bd1 commit cfb62f0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
mkdir ITK-build
6666
cd ITK-build
6767
$(compilerInitialization)
68-
cmake -DCMAKE_C_COMPILER:FILEPATH="$(cCompiler)" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER="$(cxxCompiler)" -DCMAKE_BUILD_TYPE:STRING=$(CMakeBuildType) -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
68+
cmake -DCMAKE_C_COMPILER:FILEPATH="$(cCompiler)" -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_COMPILER="$(cxxCompiler)" -DCMAKE_BUILD_TYPE:STRING=$(CMakeBuildType) -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
6969
ninja
7070
workingDirectory: $(Agent.BuildDirectory)
7171
displayName: 'Build ITK'

src/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,4 @@ set( PerformanceBenchmarking_SRCS
6464
PerformanceBenchmarkingUtilities.cxx
6565
${CMAKE_BINARY_DIR}/PerformanceBenchmarkingInformation.h)
6666

67-
add_library( PerformanceBenchmarking ${ITK_LIBRARY_BUILD_TYPE} ${PerformanceBenchmarking_SRCS})
68-
itk_module_link_dependencies()
69-
itk_module_target(PerformanceBenchmarking)
67+
itk_module_add_library(PerformanceBenchmarking ${PerformanceBenchmarking_SRCS})

0 commit comments

Comments
 (0)