Skip to content

Commit

Permalink
[CMake] avoid complete recompilation and patchs problems (on mac for …
Browse files Browse the repository at this point in the history
…instance) (medInria#781)

* [Patchs] avoid compilation err applying patchs twice

* [patches] build_always 0 for patches

* [DCMTK] test ep_source_dir

* [DCMTK] build_always 0

* [extproj] add if ep_source_dir for all

* [CMake] rm ep_source_dir on master branches, mv BUILD_ALW in other PR

Co-authored-by: ci <ci@music-macos1015.cs1cloud.internal>
(cherry picked from commit acf3be2)
  • Loading branch information
mathildemerle authored and Florent2305 committed Nov 4, 2020
1 parent 60f71f3 commit 3670f37
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function(ep_GeneratePatchCommand ep OutVar)
endif()
endforeach()

set(PATCH_COMMAND)
set(PATCH_COMMAND "")
if (NOT "${PATCHES_TO_APPLY}" STREQUAL "")
set(PATCH_COMMAND ${GIT_BIN} apply --ignore-whitespace ${PATCHES_TO_APPLY})
endif()
Expand Down
11 changes: 6 additions & 5 deletions superbuild/projects_modules/DCMTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url git://git.dcmtk.org/dcmtk.git)
set(git_tag DCMTK-3.6.2)
if (NOT DEFINED ${ep}_SOURCE_DIR)
set(git_url git://git.dcmtk.org/dcmtk.git)
set(git_tag DCMTK-3.6.2)
endif()

## #############################################################################
## Check if patch has to be applied
Expand Down Expand Up @@ -104,7 +106,7 @@ ExternalProject_Add(${ep}
BINARY_DIR ${build_path}
TMP_DIR ${tmp_path}
STAMP_DIR ${stamp_path}

GIT_REPOSITORY ${git_url}
GIT_TAG ${git_tag}
PATCH_COMMAND ${${ep}_PATCH_COMMAND}
Expand All @@ -123,7 +125,6 @@ ExternalProject_Add(${ep}
ExternalProject_Get_Property(${ep} binary_dir)
set(${ep}_DIR ${binary_dir} PARENT_SCOPE)


endif() #NOT USE_SYSTEM_ep

endfunction()
11 changes: 5 additions & 6 deletions superbuild/projects_modules/ITK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITHUB_PREFIX}InsightSoftwareConsortium/ITK.git)
set(git_tag v5.0.0)
if (NOT DEFINED ${ep}_SOURCE_DIR)
set(git_url ${GITHUB_PREFIX}InsightSoftwareConsortium/ITK.git)
set(git_tag v5.0.0)
endif()

## #############################################################################
## Add specific cmake arguments for configuration step of the project
Expand Down Expand Up @@ -99,16 +101,13 @@ ExternalProject_Add(${ep}
BUILD_ALWAYS 1
)


## #############################################################################
## Set variable to provide infos about the project
## #############################################################################

ExternalProject_Get_Property(ITK binary_dir)
set(${ep}_DIR ${binary_dir} PARENT_SCOPE)



endif() #NOT USE_SYSTEM_ep

endfunction()
10 changes: 4 additions & 6 deletions superbuild/projects_modules/LogDemons.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ EP_Initialisation(${ep}

if (NOT USE_SYSTEM_${ep})
## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITHUB_PREFIX}Inria-Asclepios/LCC-LogDemons.git)
set(git_tag master)

set(git_url ${GITHUB_PREFIX}Inria-Asclepios/LCC-LogDemons.git)
set(git_tag master)

## #############################################################################
## Add specific cmake arguments for configuration step of the project
Expand Down Expand Up @@ -92,10 +91,9 @@ ExternalProject_Add(${ep}
CMAKE_ARGS ${cmake_args}
DEPENDS ${${ep}_dependencies}
INSTALL_COMMAND ""
BUILD_ALWAYS 1
BUILD_ALWAYS 1
)


## #############################################################################
## Set variable to provide infos about the project
## #############################################################################
Expand Down
4 changes: 2 additions & 2 deletions superbuild/projects_modules/QtDCM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITHUB_PREFIX}medInria/qtdcm.git)
set(git_tag APHP)
set(git_tag APHP)

## #############################################################################
## Add specific cmake arguments for configuration step of the project
Expand Down
11 changes: 6 additions & 5 deletions superbuild/projects_modules/RPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITHUB_PREFIX}Inria-Asclepios/RPI.git)
set(git_tag ITK5.0)
if (NOT DEFINED ${ep}_SOURCE_DIR)
set(git_url ${GITHUB_PREFIX}Inria-Asclepios/RPI.git)
set(git_tag ITK5.0)
endif()

## #############################################################################
## Add specific cmake arguments for configuration step of the project
Expand Down Expand Up @@ -91,8 +93,7 @@ ExternalProject_Add(${ep}
DEPENDS ${${ep}_dependencies}
INSTALL_COMMAND ""
BUILD_ALWAYS 1
)

)

## #############################################################################
## Set variable to provide infos about the project
Expand Down
10 changes: 4 additions & 6 deletions superbuild/projects_modules/TTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ EP_Initialisation(${ep}
)

if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITHUB_PREFIX}Inria-Asclepios/TTK-Public.git)
set(git_tag master)


## #############################################################################
## Add specific cmake arguments for configuration step of the project
## #############################################################################
Expand Down Expand Up @@ -91,17 +91,15 @@ ExternalProject_Add(${ep}
CMAKE_ARGS ${cmake_args}
DEPENDS ${${ep}_dependencies}
INSTALL_COMMAND ""
BUILD_ALWAYS 1
)

BUILD_ALWAYS 1
)

## #############################################################################
## Set variable to provide infos about the project
## #############################################################################

ExternalProject_Get_Property(${ep} binary_dir)
set(${ep}_DIR ${binary_dir} PARENT_SCOPE)


endif() #NOT USE_SYSTEM_ep

Expand Down
8 changes: 5 additions & 3 deletions superbuild/projects_modules/VTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITHUB_PREFIX}Kitware/VTK.git)
set(git_tag v8.1.2)
if (NOT DEFINED ${ep}_SOURCE_DIR)
set(git_url ${GITHUB_PREFIX}Kitware/VTK.git)
set(git_tag v8.1.2)
endif()

## #############################################################################
## Add specific cmake arguments for configuration step of the project
Expand Down
11 changes: 5 additions & 6 deletions superbuild/projects_modules/dtk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITLAB_INRIA_PREFIX}dtk/dtk.git)
set(git_tag 1.7.1)

if (NOT DEFINED ${ep}_SOURCE_DIR)
set(git_url ${GITLAB_INRIA_PREFIX}dtk/dtk.git)
set(git_tag 1.7.1)
endif()

## #############################################################################
## Add specific cmake arguments for configuration step of the project
Expand Down Expand Up @@ -81,7 +82,6 @@ set(cmake_args
-DQt5_DIR=${Qt5_DIR}
)


## #############################################################################
## Add external-project
## #############################################################################
Expand All @@ -105,7 +105,6 @@ ExternalProject_Add(${ep}
BUILD_ALWAYS 1
)


## #############################################################################
## Set variable to provide infos about the project
## #############################################################################
Expand Down
4 changes: 1 addition & 3 deletions superbuild/projects_modules/dtkImaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Set up versioning control.
## Set up versioning control
## #############################################################################

set(git_url ${GITLAB_INRIA_PREFIX}dtk/dtk-imaging.git)
set(git_tag master)


## #############################################################################
## Add specific cmake arguments for configuration step of the project
## #############################################################################
Expand Down Expand Up @@ -94,7 +93,6 @@ ExternalProject_Add(${ep}
BUILD_ALWAYS 1
)


## #############################################################################
## Set variable to provide infos about the project
## #############################################################################
Expand Down
2 changes: 1 addition & 1 deletion superbuild/projects_modules/ffmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EP_Initialisation(${ep}
if (NOT USE_SYSTEM_${ep})

## #############################################################################
## Define repository where get the sources
## Set up versioning control
## #############################################################################

if (NOT DEFINED ${ep}_SOURCE_DIR)
Expand Down

0 comments on commit 3670f37

Please sign in to comment.