From c5ec218ae2e3c98e5201530880f0a2dbd4e241b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 2 Jul 2019 16:36:33 +0200 Subject: Add shared instructions that handles CMAKE_C[XX]_COMPILER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That way we do not need to copy the instructions between submodules. The instructions append CMAKE_C_COMPILER and CMAKE_CXX_COMPILER to CONFIGURE_ARGS. Change-Id: I56c314aeb2b73fa7b1dd5c43b47b2d38149548b6 Reviewed-by: Jędrzej Nowacki --- README | 3 ++- coin/instructions/set_cmake_c_cxx_compiler.yaml | 30 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 coin/instructions/set_cmake_c_cxx_compiler.yaml diff --git a/README b/README index 0ea449ea..3aa59333 100644 --- a/README +++ b/README @@ -1,5 +1,6 @@ This repository contains much of the configuration which defines what Pulse -projects do. +projects do and some Coin shared code. Below you will find documentation +only for the first one. HOW IT WORKS: diff --git a/coin/instructions/set_cmake_c_cxx_compiler.yaml b/coin/instructions/set_cmake_c_cxx_compiler.yaml new file mode 100644 index 00000000..d5c52d89 --- /dev/null +++ b/coin/instructions/set_cmake_c_cxx_compiler.yaml @@ -0,0 +1,30 @@ +type: Group +instructions: + - type: PrependToEnvironmentVariable + variableName: CONFIGURE_ARGS + variableValue: "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc " + enable_if: + condition: property + property: host.compiler + contains_value: ICC + - type: PrependToEnvironmentVariable + variableName: CONFIGURE_ARGS + variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ " + enable_if: + condition: property + property: host.compiler + contains_value: GCC + - type: PrependToEnvironmentVariable + variableName: CONFIGURE_ARGS + variableValue: "-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe " + enable_if: + condition: property + property: host.compiler + contains_value: MSVC + - type: PrependToEnvironmentVariable + variableName: CONFIGURE_ARGS + variableValue: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ " + enable_if: + condition: property + property: host.compiler + contains_value: Clang -- cgit v1.2.3