Skip to content

Commit

Permalink
Merge pull request #393 from robotology/fixcmake323
Browse files Browse the repository at this point in the history
ExternalProject: Check all possible locations of RepositoryInfo.txt.in file to avoid problem with CMake 3.23 and release YCM 0.13.1
  • Loading branch information
traversaro authored Mar 30, 2022
2 parents 1ee24c6 + 87cf9c3 commit ba2f668
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
18 changes: 13 additions & 5 deletions cmake-next/proposed/ExternalProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,14 @@ set(_ep_hash_regex "^(${_ep_hash_algos})=([0-9A-Fa-f]+)$")
set(_ExternalProject_SELF "${CMAKE_CURRENT_LIST_FILE}")
get_filename_component(_ExternalProject_SELF_DIR "${_ExternalProject_SELF}" PATH)

# Check location of RepositoryInfo.txt.in
# Workaround of https://github.com/robotology/robotology-superbuild/issues/1074
if(EXISTS "${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in")
set(_ExternalProject_RepositoryInfo_Location "${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in")
elseif(EXISTS "${CMAKE_ROOT}/Modules/ExternalProject/RepositoryInfo.txt.in")
set(_ExternalProject_RepositoryInfo_Location "${CMAKE_ROOT}/Modules/ExternalProject/RepositoryInfo.txt.in")
endif()

function(_ep_parse_arguments f name ns args)
# Transfer the arguments to this function into target properties for the
# new custom target we just added so that we can set up all the build steps
Expand Down Expand Up @@ -2427,7 +2435,7 @@ function(_ep_add_download_command name)
set(module ${cvs_module})
set(tag ${cvs_tag})
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${_ExternalProject_RepositoryInfo_Location}"
"${stamp_dir}/${name}-cvsinfo.txt"
@ONLY
)
Expand All @@ -2452,7 +2460,7 @@ function(_ep_add_download_command name)
set(module)
set(tag ${svn_revision})
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${_ExternalProject_RepositoryInfo_Location}"
"${stamp_dir}/${name}-svninfo.txt"
@ONLY
)
Expand Down Expand Up @@ -2515,7 +2523,7 @@ function(_ep_add_download_command name)
set(module)
set(tag ${git_remote_name})
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${_ExternalProject_RepositoryInfo_Location}"
"${stamp_dir}/${name}-gitinfo.txt"
@ONLY
)
Expand Down Expand Up @@ -2555,7 +2563,7 @@ function(_ep_add_download_command name)
set(module)
set(tag)
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${_ExternalProject_RepositoryInfo_Location}"
"${stamp_dir}/${name}-hginfo.txt"
@ONLY
)
Expand Down Expand Up @@ -2593,7 +2601,7 @@ function(_ep_add_download_command name)
set(module "${url}")
set(tag "${hash}")
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${_ExternalProject_RepositoryInfo_Location}"
"${stamp_dir}/${name}-urlinfo.txt"
@ONLY
)
Expand Down
10 changes: 9 additions & 1 deletion help/release/0.13.1.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
YCM 0.13.1 (UNRELEASED) Release Notes
YCM 0.13.1 (2022-03-31) Release Notes
*************************************

.. only:: html

.. contents::

Changes made since YCM 0.13.0 include the following.

Important Changes
=================

* The ``ExternalProject`` module vendored in YCM (used in ``YCMBootstrap``)
has been updated for compatibility with CMake 3.23 .

* FindGraphviz: Fix finding graphviz not installed in system directories .
2 changes: 1 addition & 1 deletion modules/YCMEPHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ set(__YCMEPHELPER_INCLUDED TRUE)

# Files downloaded during YCM bootstrap
set(_ycm_CMakeParseArguments_sha1sum 0c4d3f7ed248145cbeb67cbd6fd7190baf2e4517)
set(_ycm_ExternalProject_sha1sum c9d1167ae7730e9e6b1d9e9243a1f4f9bd9e2c5d)
set(_ycm_ExternalProject_sha1sum ba8c547caa118c5ace50857c7839f76914926ef7)

# Files in all projects that need to bootstrap YCM
set(_ycm_IncludeUrl_sha1sum 997de3554f0d03ae22952a64fe26cdad118e8199)
Expand Down

0 comments on commit ba2f668

Please sign in to comment.