Commit 2bf7206d authored by Ryan Krattiger's avatar Ryan Krattiger Committed by Kitware Robot
Browse files

Merge topic 'fixed_custom_package_name'

dd0b8a78 Removed unused package properties
7f412b0b Fixed suffix override
9948eb51

 Re-enabled overriding CPACK_PACAKGE_FILE_NAME for packaging
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: John Tourtellott's avatarJohn Tourtellott <john.tourtellott@kitware.com>
Acked-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Acked-by: John Tourtellott's avatarJohn Tourtellott <john.tourtellott@kitware.com>
Merge-request: !752
parents 53d62806 dd0b8a78
Pipeline #229361 failed with stages
in 222 minutes and 3 seconds
......@@ -227,6 +227,9 @@ function (superbuild_add_packaging)
return ()
endif ()
# FUTURE: move this to superbuild_add_extra_package_test
list(APPEND superbuild_export_variables SUPERBUILD_PACKAGE_MODE)
if (WIN32)
set(generators
ZIP)
......@@ -259,20 +262,24 @@ function (superbuild_add_packaging)
list(APPEND superbuild_export_variables
BOOST_ADDITIONAL_LIBRARIES)
include(package.test)
get_property(PACKAGE_LABELS GLOBAL PROPERTY "${SUPERBUILD_PACKAGE_MODE}_PACKAGE_LABELS")
get_property(PACKAGE_SUFFIX GLOBAL PROPERTY "${SUPERBUILD_PACKAGE_MODE}_PACKAGE_SUFFIX")
superbuild_package_suffix(PACKAGE_SUFFIX)
string(TOUPPER "${SUPERBUILD_PACKAGE_MODE}" PACKAGE_LABELS)
# Setup the package suffix for user override
superbuild_package_suffix("${SUPERBUILD_PACKAGE_MODE}_PACKAGE_SUFFIX")
list(APPEND superbuild_export_variables
PACKAGE_SUFFIX)
${SUPERBUILD_PACKAGE_MODE}_PACKAGE_SUFFIX
)
# Setup the package file name for override
set("${SUPERBUILD_PACKAGE_MODE}_PACKAGE_FILE_NAME" ""
CACHE STRING "If set, overrides the generated filename for the package")
set(PACKAGE_FILE_NAME ${SUPERBUILD_PACKAGE_MODE}_PACKAGE_FILE_NAME)
mark_as_advanced("${SUPERBUILD_PACKAGE_MODE}_PACKAGE_FILE_NAME")
list(APPEND superbuild_export_variables
PACKAGE_FILE_NAME)
${SUPERBUILD_PACKAGE_MODE}_PACKAGE_FILE_NAME)
# This must be included after the PACKAGE_SUFFIX and PACKAGE_FILE_NAME variables are determined
include(package.test)
foreach (generator IN LISTS generators)
superbuild_add_extra_package_test(${SUPERBUILD_PACKAGE_MODE} "${generator}"
......
......@@ -2,12 +2,12 @@ include (SuperbuildTestingMacros)
set(modelbuilder_extract_root "${CMAKE_BINARY_DIR}/Testing/Temporary")
if (CMB_PACKAGE_FILE_NAME)
set(glob_prefix "${CMB_PACKAGE_FILE_NAME}")
if (${SUPERBUILD_PACKAGE_MODE}_PACKAGE_FILE_NAME)
set(glob_prefix "${${SUPERBUILD_PACKAGE_MODE}_PACKAGE_FILE_NAME}")
else ()
set(glob_prefix "modelbuilder-*")
if (CMB_PACKAGE_SUFFIX)
set(glob_prefix "${glob_prefix}-${CMB_PACKAGE_SUFFIX}")
if (${SUPERBUILD_PACKAGE_MODE}_PACKAGE_SUFFIX AND NOT ${SUPERBUILD_PACKAGE_MODE}_PACKAGE_SUFFIX STREQUAL "<default>")
set(glob_prefix "${glob_prefix}-${${SUPERBUILD_PACKAGE_MODE}_PACKAGE_SUFFIX}")
endif ()
endif ()
......@@ -22,7 +22,7 @@ package file.
#]==]
function (add_package_extract_test generator)
set(extract_dir "${modelbuilder_extract_root}/modelbuilder-${generator}/test-extracted")
set(extract_dir "${modelbuilder_extract_root}/${SUPERBUILD_PACKAGE_MODE}-${generator}/test-extracted")
superbuild_add_extract_test("modelbuilder" "${glob_prefix}" "${generator}" "${extract_dir}")
endfunction ()
......
message(STATUS "Configuring aeva package")
set_property(GLOBAL PROPERTY aeva_PACKAGE_LABELS "AEVA")
set_property(GLOBAL PROPERTY aeva_PACKAGE_SUFFIX "<default>")
set_property(GLOBAL PROPERTY aeva_PACKAGE_NAME "aevaCMB")
include(SuperbuildVersionMacros)
superbuild_configure_project_version(aeva)
......
......@@ -17,7 +17,7 @@ endif ()
################################################################################
if (NOT DEFINED package_suffix)
set(package_suffix "${CMB_PACKAGE_SUFFIX}")
set(package_suffix "${${SUPERBUILD_PACKAGE_MODE}_PACKAGE_SUFFIX}")
endif ()
set(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
......@@ -29,7 +29,7 @@ if (package_suffix)
endif ()
if (NOT DEFINED package_filename)
set(package_filename "${CMB_PACKAGE_FILE_NAME}")
set(package_filename "${${SUPERBUILD_PACKAGE_MODE}_PACKAGE_FILE_NAME}")
endif ()
if (package_filename)
......
message(STATUS "Configuring modelbuilder package")
set_property(GLOBAL PROPERTY modelbuilder_PACKAGE_LABELS "CMB")
set_property(GLOBAL PROPERTY modelbuilder_PACKAGE_SUFFIX "<default>")
set_property(GLOBAL PROPERTY modelbuilder_PACKAGE_NAME "modelbuilder")
set_property(GLOBAL PROPERTY modelbuilder_REQUIRED_PROJECTS "cmb;smtk;cmbworkflows")
set_property(GLOBAL PROPERTY modelbuilder_EXCLUDE_PROJECTS "")
......
message(STATUS "Configuring modulebuild+truchas package")
set_property(GLOBAL PROPERTY truchas_PACKAGE_LABELS "TRUCHAS")
set_property(GLOBAL PROPERTY truchas_REQUIRED_PROJECTS "modelbuilder;smtktruchasextensions;cmb;smtk")
set_property(GLOBAL PROPERTY truchas_EXCLUDE_PROJECTS "")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment