Skip to content

Commit dc62323

Browse files
authored
Merge pull request #74 from thewtex/windows-ci
ENH: Add Windows build configuration to Azure Pipelines
2 parents 4c09838 + 119bbc5 commit dc62323

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed

Superbuild/External-ITK.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Get and build itk
33

44
if(NOT ITK_TAG)
5-
# 2018-09-26
6-
set(ITK_TAG "b784f6355a88650f13345025ece292dd60a0d98c")
5+
# 2018-09-27
6+
set(ITK_TAG "5e61c289a677a74bffa4c113bf991a18f4b98495")
77
endif()
88

99
set(_vtk_args)
@@ -47,6 +47,14 @@ if(APPLE)
4747
"-DBUILD_SHARED_LIBS:BOOL=ON"
4848
)
4949
endif()
50+
set(_windows_args)
51+
set(_zlib_deps zlib)
52+
if(WIN32)
53+
set(_windows_args
54+
"-DITK_USE_SYSTEM_ZLIB:BOOL=OFF"
55+
)
56+
set(_zlib_deps )
57+
endif()
5058

5159
ExternalProject_Add(ITK
5260
GIT_REPOSITORY "${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git"
@@ -71,8 +79,9 @@ ExternalProject_Add(ITK
7179
${_opencv_args}
7280
${_wrap_python_args}
7381
${_apple_args}
82+
${_windows_args}
7483
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "ITK install skipped"
75-
DEPENDS ${ITK_DEPENDENCIES} ${_python_depends} zlib
84+
DEPENDS ${ITK_DEPENDENCIES} ${_python_depends} ${_zlib_deps}
7685
LOG_BUILD 0
7786
)
7887

Superbuild/External-zlib.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ ExternalProject_Add(zlib
99
BINARY_DIR zlib-build
1010
INSTALL_DIR zlib-install
1111
CMAKE_CACHE_ARGS
12-
## CXX should not be needed, but it a cmake default test
13-
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
14-
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
12+
${ep_common_args}
1513
-DZLIB_MANGLE_PREFIX:STRING=itkexamples_zlib_
1614
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
1715
)

Superbuild/Superbuild.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ endif()
3131
set(ITKExamples_DEPENDENCIES )
3232
set(ITK_DEPENDENCIES )
3333

34-
# Used by ITK, VTK, and Python -- always build it.
35-
include(${CMAKE_SOURCE_DIR}/External-zlib.cmake)
34+
# Used by ITK, VTK, -- always build it.
35+
if(NOT WIN32 OR ITKExamples_USE_VTK AND NOT VTK_DIR)
36+
include(${CMAKE_SOURCE_DIR}/External-zlib.cmake)
37+
endif()
3638

3739
option(ITKExamples_USE_OpenCV "Add OpenCV to the superbuild" OFF)
3840
if(NOT OpenCV_DIR AND ITKExamples_USE_OpenCV)

Utilities/Testing/azure-pipelines.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
git submodule update --init --recursive
1414
popd
1515
16-
git clone -b dashboard --single-branch https://github.com/thewtex/ITKExamples.git ITKExamples-dashboard
16+
git clone -b dashboard --single-branch https://github.com/InsightSoftwareConsortium/ITKExamples.git ITKExamples-dashboard
1717
1818
sudo pip3 install ninja
1919
sudo apt-get install -y python3-venv
@@ -39,7 +39,7 @@ jobs:
3939
git submodule update --init --recursive
4040
popd
4141
42-
git clone -b dashboard --single-branch https://github.com/thewtex/ITKExamples.git ITKExamples-dashboard
42+
git clone -b dashboard --single-branch https://github.com/InsightSoftwareConsortium/ITKExamples.git ITKExamples-dashboard
4343
4444
sudo pip3 install ninja
4545
@@ -49,3 +49,23 @@ jobs:
4949
ctest -S ITKExamples-dashboard/azure_dashboard.cmake -VV -j 4
5050
displayName: Build and Test
5151
workingDirectory: $(Agent.BuildDirectory)
52+
53+
- job: Windows
54+
timeoutInMinutes: 0
55+
cancelTimeoutInMinutes: 60
56+
pool:
57+
vmImage: 'vs2017-win2016'
58+
steps:
59+
- script: |
60+
git clone -b dashboard --single-branch https://github.com/InsightSoftwareConsortium/ITKExamples.git ITKExamples-dashboard
61+
62+
pip3 install ninja
63+
64+
cmake --version
65+
66+
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
67+
set CC=cl.exe
68+
set CXX=cl.exe
69+
ctest -S ITKExamples-dashboard/azure_dashboard.cmake -VV -j 4
70+
displayName: Build and Test
71+
workingDirectory: $(Agent.BuildDirectory)

0 commit comments

Comments
 (0)