@@ -47,29 +47,28 @@ endif()
4747#
4848# Ensure all mandatory parameters have been set.
4949#
50- if (NOT DEFINED build_name )
51- message (FATAL_ERROR "Parameter build_name not defined." )
50+ if (NOT DEFINED preset )
51+ message (FATAL_ERROR "Parameter preset not defined." )
5252endif ()
53- set (preset ${build_name} )
53+ message (STATUS "CDash preset: ${preset} " )
54+ set (build_name ${preset} )
5455
5556if (NOT DEFINED build_group)
5657 message (FATAL_ERROR "Parameter build_group not defined." )
5758endif ()
5859
5960#
60- # Parse the build name to extract input parameters, and validate them.
61+ # Parse the preset to extract input parameters, and validate them.
6162#
62- string (TOLOWER "${build_name} " build_name_lower)
63- message (STATUS "CDash build name: ${build_name} " )
64-
65- string (REPLACE "-" ";" build_name_list ${build_name_lower} )
66- list (LENGTH build_name_list bn_length)
67- if (NOT bn_length EQUAL 3)
68- message (FATAL_ERROR "Invalid build name: ${build_name} " )
63+ string (TOLOWER "${preset} " preset_lower)
64+ string (REPLACE "-" ";" preset_list ${preset_lower} )
65+ list (LENGTH preset_list pl_length)
66+ if (NOT pl_length EQUAL 3)
67+ message (FATAL_ERROR "Invalid preset: ${preset} " )
6968endif ()
7069
7170# Setup the operative system.
72- list (GET build_name_list 0 operative_system)
71+ list (GET preset_list 0 operative_system)
7372if (NOT DEFINED operative_system)
7473 message (FATAL_ERROR "Operative system not supplied." )
7574endif ()
@@ -85,7 +84,7 @@ endif()
8584endif ()
8685
8786# Setup the compiler.
88- list (GET build_name_list 1 compiler)
87+ list (GET preset_list 1 compiler)
8988if (NOT DEFINED compiler)
9089 message (FATAL_ERROR "Compiler not supplied." )
9190endif ()
@@ -103,7 +102,7 @@ else()
103102endif ()
104103
105104# Setup the configuration
106- list (GET build_name_list 2 configuration )
105+ list (GET preset_list 2 configuration )
107106if (NOT DEFINED configuration )
108107 message (FATAL_ERROR "Configuration not supplied." )
109108 endif ()
@@ -139,7 +138,7 @@ else()
139138 set (CTEST_SITE "${APP_SITE} " )
140139endif ()
141140
142- set (CTEST_BUILD_NAME "${preset } " )
141+ set (CTEST_BUILD_NAME "${build_name } " )
143142
144143# Set the generator. This will override the presets, but we have no option as
145144# CTest refuses to configure unless there is a generator.
0 commit comments