Skip to content

Commit

Permalink
version: Remove version_compute change
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisv committed Jul 16, 2024
1 parent 5668d4e commit 25ae553
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ message(STATUS "Configuring \"${PROJECT_NAME}\" (${PROJECT_URL})")

# If the project version number is not set, compute it automatically.
if(NOT DEFINED PROJECT_VERSION)
version_compute(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
version_compute()
else()
if(NOT DEFINED PROJECT_VERSION_MAJOR
AND NOT DEFINED PROJECT_VERSION_MINOR
Expand Down
14 changes: 0 additions & 14 deletions version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ function(_COMPUTE_VERSION_FROM_ROS_PACKAGE_XML_FILE)
endfunction()

# .rst: .. ifmode:: user
# ~~~
# .. command:: VERSION_COMPUTE([PROJECT_SOURCE_DIR <dir>])
# ~~~
#
# :param PROJECT_SOURCE_DIR: If PROJECT_SOURCE_DIR is already set, it will be
# overwritten by <dir>.
#
# .. variable:: PROJECT_VERSION_COMPUTATION_METHODS
#
Expand Down Expand Up @@ -201,11 +195,6 @@ endfunction()
# If `PROJECT_VERSION`` is already set, this macro does nothing.
#
macro(VERSION_COMPUTE)
set(options)
set(oneValueArgs PROJECT_SOURCE_DIR)
set(multiValueArgs)
cmake_parse_arguments(_version_args "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
set(PROJECT_STABLE False)

if("${PROJECT_SOURCE_DIR}" STREQUAL "")
Expand All @@ -214,9 +203,6 @@ macro(VERSION_COMPUTE)
else()
set(PROJECT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
elseif(_version_args_PROJECT_SOURCE_DIR)
set(PROJECT_SOURCE_DIR ${_version_args_PROJECT_SOURCE_DIR})
endif()

if(NOT DEFINED PROJECT_VERSION_COMPUTATION_METHODS)
list(APPEND PROJECT_VERSION_COMPUTATION_METHODS "ROS_PACKAGE_XML_FILE"
Expand Down

0 comments on commit 25ae553

Please sign in to comment.