From 8e4ef10c388c4ec611b8fce0217b70a88028c342 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 15 Dec 2021 19:29:28 +0100 Subject: [PATCH] coin: Add CI_PATH_SEP env var with value of host OS path separator Can be useful in the future for path construction, to avoid adding two different instructions where the only difference is the path style. Pick-to: 6.2 6.3 Change-Id: Id67b287a2d9f67889dcc5c4fc7781d9ef60a56be Reviewed-by: Toni Saario --- coin/instructions/prepare_building_env.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/coin/instructions/prepare_building_env.yaml b/coin/instructions/prepare_building_env.yaml index 7909f52759a..9587b48a2e9 100644 --- a/coin/instructions/prepare_building_env.yaml +++ b/coin/instructions/prepare_building_env.yaml @@ -8,6 +8,24 @@ instructions: variableName: CMAKE_GENERATOR variableValue: Ninja + # Set path separator based on host platform. + # \ on Windows (double \\ for escaping the backslash) + # / on UNIX + - type: EnvironmentVariable + variableName: CI_PATH_SEP + variableValue: "\\" + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: CI_PATH_SEP + variableValue: "/" + disable_if: + condition: property + property: host.os + equals_value: Windows + # Export ICC specific env. variables - type: Group