Skip to content

Commit

Permalink
Define _cps_is_numeric in the scope in which it is used
Browse files Browse the repository at this point in the history
  • Loading branch information
greenc-FNAL committed Jan 5, 2024
1 parent 527459d commit 255b5a5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Modules/CetGenerateSphinxDocs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ function(cet_publish_sphinx_html PUBLISH_ROOT PUBLISH_VERSION)
endif()
set(PUBLISH_ARGS EXTRA_ARGS -A versionswitch=1)

if (PUBLISH_VERSION MATCHES "^[0-9]+(\\.[0-9]+)?")
set(_cps_is_numeric TRUE)
endif()

# Determine output location.
if (_cps_is_numeric)
set(_cps_output_dir "${PUBLISH_ROOT}/v${PUBLISH_VERSION}")
Expand Down Expand Up @@ -366,9 +370,6 @@ ${CETMODULES_CURRENT_PROJECT_NAME}")
endmacro()

macro(_cps_process_version_data)
if (PUBLISH_VERSION MATCHES "^[0-9]+(\\.[0-9]+)?")
set(_cps_is_numeric TRUE)
endif()
unset(VERSION_DATA)
if (EXISTS "${PUBLISH_ROOT}/versions.json")
file(READ "${PUBLISH_ROOT}/versions.json" VERSION_DATA)
Expand Down

0 comments on commit 255b5a5

Please sign in to comment.