From 65d5e725d3d0b99451da8f1ee5fe50cd88ee9084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Mon, 1 Jul 2019 14:59:17 +0200 Subject: Handle CMAKE_C_COMPILER and CMAKE_CXX_COMPILER automatically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do not need or should to define these variables in the product configuration file. It should be enough to just have the compiler name. Change-Id: I797958a2c35641f1b79e4e74f3feb49312f8b9c4 Reviewed-by: Jędrzej Nowacki --- coin/module_config.yaml | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'coin') diff --git a/coin/module_config.yaml b/coin/module_config.yaml index 8365e7a67d..5972090fbf 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -128,14 +128,43 @@ icc_specific_instructions: &icc_export_variables - type: PrependToEnvironmentVariable variableName: PATH variableValue: "{{.Env.ICC64_18_PATH}}" - - type: PrependToEnvironmentVariable - variableName: CONFIGURE_ARGS - variableValue: "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc " enable_if: condition: property property: host.compiler equals_value: ICC_18 +set_cmake_compiler: &set_cmake_c_cxx_compiler + 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 + call_cmake_instructions: &call_cmake type: Group instructions: @@ -209,6 +238,7 @@ build_instructions: variableName: CMAKE_GENERATOR variableValue: Ninja - *icc_export_variables + - *set_cmake_c_cxx_compiler - *export_target_architecture_and_sdk - *find_path_to_compiler # With MSVC we need setup the environment before every subprocess call. -- cgit v1.2.3