Skip to content

Commit 4023255

Browse files
committed
COMP: Synchronize with template builder scripts.
1 parent 6fcdbe6 commit 4023255

5 files changed

Lines changed: 30 additions & 40 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
cmake_minimum_required(VERSION 3.10.2)
22
project(TwoProjectionRegistration)
33

4+
# Header only libraries do not use
5+
set(TwoProjectionRegistration_LIBRARIES "")
6+
47
if(NOT ITK_SOURCE_DIR)
5-
find_package(ITK 5.0 REQUIRED)
8+
find_package(ITK 5.1 REQUIRED)
69
list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
710
include(ITKModuleExternal)
811
else()
12+
set(ITK_DIR ${CMAKE_BINARY_DIR})
913
itk_module_impl()
1014
endif()

README.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
ITKTwoProjectionRegistration
2-
============================
1+
TwoProjectionRegistration
2+
=================================
33

44
.. image:: https://dev.azure.com/InsightSoftwareConsortium/ITKModules/_apis/build/status/InsightSoftwareConsortium.ITKTwoProjectionRegistration?branchName=master
55
:target: https://dev.azure.com/InsightSoftwareConsortium/ITKModules/_build/latest?definitionId=13&branchName=master
66
:alt: Build Status
77

8+
.. image:: https://img.shields.io/pypi/v/itk-twoprojectregistration.svg
9+
:target: https://pypi.python.org/pypi/itk-twoprojectregistration
10+
:alt: PyPI Version
11+
12+
.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
13+
:target: https://github.com/InsightSoftwareConsortium/TwoProjectionRegistration/blob/master/LICENSE)
14+
:alt: License
815

916
Overview
1017
--------

itk-module.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# the top-level README is used for describing this module, just
22
# re-used it for documentation here
3-
get_filename_component(MY_CURENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
4-
file(READ "${MY_CURENT_DIR}/README.rst" DOCUMENTATION)
3+
get_filename_component(MY_CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
4+
file(READ "${MY_CURRENT_DIR}/README.rst" DOCUMENTATION)
55

66
# itk_module() defines the module dependencies in TwoProjectionRegistration
7+
# TwoProjectionRegistration depends on ITKCommon
78
# The testing module in TwoProjectionRegistration depends on ITKTestKernel
9+
# and ITKMetaIO(besides TwoProjectionRegistration and ITKCore)
810
# By convention those modules outside of ITK are not prefixed with
9-
# ITK
11+
# ITK.
1012

1113
# define the dependencies of the include module and the tests
1214
itk_module(TwoProjectionRegistration
@@ -22,5 +24,5 @@ itk_module(TwoProjectionRegistration
2224
DESCRIPTION
2325
"${DOCUMENTATION}"
2426
EXCLUDE_FROM_DEFAULT
25-
ENABLE_SHARED
27+
# Header only libraries do not use ENABLE_SHARED
2628
)

test/azure-pipelines.yml

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ jobs:
5555
python -m pip install --upgrade pip
5656
python -m pip install --upgrade setuptools
5757
python -m pip install scikit-ci-addons
58-
python -m pip install cookiecutter
5958
python -m pip install ninja
6059
displayName: 'Install build dependencies'
6160
6261
- script: |
6362
git clone --depth 5 --branch $(ITKGitTag) https://github.com/InsightSoftwareConsortium/ITK.git
63+
cd ITK
64+
git checkout $(ITKGitTag)
6465
workingDirectory: $(Agent.BuildDirectory)
6566
displayName: 'Download ITK'
6667
@@ -77,16 +78,11 @@ jobs:
7778
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/dashboard/itk_common.cmake -O
7879
displayName: 'Fetch CTest driver script'
7980
80-
- bash: |
81-
python -m cookiecutter --no-input --output-dir "$(Agent.BuildDirectory)" "$(Build.SourcesDirectory)"
82-
mkdir "$(Agent.BuildDirectory)/ITKModuleTemplate/.git"
83-
displayName: 'Evaluate template'
84-
8581
- bash: |
8682
cat > dashboard.cmake << EOF
8783
set(CTEST_SITE "Azure.\$ENV{AGENT_MACHINENAME}")
8884
file(TO_CMAKE_PATH "\$ENV{AGENT_BUILDDIRECTORY}" CTEST_DASHBOARD_ROOT)
89-
file(TO_CMAKE_PATH "\$ENV{AGENT_BUILDDIRECTORY}/ITKModuleTemplate" CTEST_SOURCE_DIRECTORY)
85+
file(TO_CMAKE_PATH "\$ENV{BUILD_SOURCESDIRECTORY}" CTEST_SOURCE_DIRECTORY)
9086
file(TO_CMAKE_PATH "\$ENV{AGENT_BUILDDIRECTORY}/build" CTEST_BINARY_DIRECTORY)
9187
set(dashboard_source_name "$(Build.Repository.Name)")
9288
if(DEFINED ENV{SYSTEM_PULLREQUEST_SOURCEBRANCH})
@@ -138,7 +134,7 @@ jobs:
138134
sudo pip3 install --upgrade pip
139135
sudo pip3 install --upgrade setuptools
140136
sudo pip3 install scikit-ci-addons
141-
ci_addons ctest_junit_formatter "$(Agent.BuildDirectory)/build" > "$(Agent.BuildDirectory)/JUnitTestResults.xml"
137+
ci_addons ctest_junit_formatter $(Agent.BuildDirectory)/build > $(Agent.BuildDirectory)/JUnitTestResults.xml
142138
condition: succeededOrFailed()
143139
displayName: 'Format CTest output in JUnit format'
144140
@@ -169,20 +165,14 @@ jobs:
169165
architecture: 'x64'
170166

171167
- script: |
172-
python -m pip install cookiecutter
173-
python -m cookiecutter --no-input --output-dir $(Agent.BuildDirectory) $(Build.SourcesDirectory)
174-
displayName: 'Evaluate template'
175-
176-
- script: |
177-
cd $(Agent.BuildDirectory)/ITKModuleTemplate
178168
export ITK_PACKAGE_VERSION=$(ITKPythonGitTag)
179-
$(Build.SourcesDirectory)/dockcross-manylinux-download-cache-and-build-module-wheels.sh
169+
./dockcross-manylinux-download-cache-and-build-module-wheels.sh
180170
displayName: 'Build Python packages'
181171
182172
- task: PublishPipelineArtifact@0
183173
inputs:
184174
artifactName: 'LinuxWheels'
185-
targetPath: '$(Agent.BuildDirectory)/ITKModuleTemplate/dist'
175+
targetPath: './dist'
186176

187177

188178
- job: 'PackageMacOS'
@@ -199,20 +189,14 @@ jobs:
199189
displayName: 'Fetch build script'
200190
201191
- script: |
202-
python -m pip install cookiecutter
203-
python -m cookiecutter --no-input --output-dir $(Agent.BuildDirectory) $(Build.SourcesDirectory)
204-
displayName: 'Evaluate template'
205-
206-
- script: |
207-
cd $(Agent.BuildDirectory)/ITKModuleTemplate
208192
export ITK_PACKAGE_VERSION=$(ITKPythonGitTag)
209-
$(Build.SourcesDirectory)/macpython-download-cache-and-build-module-wheels.sh
193+
./macpython-download-cache-and-build-module-wheels.sh
210194
displayName: 'Build Python packages'
211195
212196
- task: PublishPipelineArtifact@0
213197
inputs:
214198
artifactName: 'MacOSWheels'
215-
targetPath: '$(Agent.BuildDirectory)/ITKModuleTemplate/dist'
199+
targetPath: './dist'
216200

217201

218202
- job: 'PackageWindows'
@@ -227,21 +211,15 @@ jobs:
227211
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/windows-download-cache-and-build-module-wheels.ps1 -O
228212
displayName: 'Fetch build script'
229213
230-
- script: |
231-
python -m pip install cookiecutter
232-
python -m cookiecutter --no-input --output-dir $(Agent.BuildDirectory) $(Build.SourcesDirectory)
233-
displayName: 'Evaluate template'
234-
235214
- script: |
236215
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
237-
cd $(Agent.BuildDirectory)\ITKModuleTemplate
238216
set ITK_PACKAGE_VERSION=$(ITKPythonGitTag)
239217
set CC=cl.exe
240218
set CXX=cl.exe
241-
powershell.exe -file $(Build.SourcesDirectory)\windows-download-cache-and-build-module-wheels.ps1
219+
powershell.exe -file .\windows-download-cache-and-build-module-wheels.ps1
242220
displayName: 'Build Python packages'
243221
244222
- task: PublishPipelineArtifact@0
245223
inputs:
246224
artifactName: 'WindowsWheels'
247-
targetPath: '$(Agent.BuildDirectory)/ITKModuleTemplate/dist'
225+
targetPath: './dist'

wrapping/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ set(WRAPPER_SUBMODULE_ORDER
88

99
itk_auto_load_submodules()
1010
itk_end_wrap_module()
11-

0 commit comments

Comments
 (0)