summaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@qt.io>2019-07-01 14:59:17 +0200
committerJędrzej Nowacki <jedrzej.nowacki@qt.io>2019-07-02 13:08:41 +0000
commit65d5e725d3d0b99451da8f1ee5fe50cd88ee9084 (patch)
treee0afb0a28b6971a77bf87e8c2222b3a2300fedfd /coin
parent3607ff064be7ce70a7d12bd486eaea55630bb7f7 (diff)
Handle CMAKE_C_COMPILER and CMAKE_CXX_COMPILER automatically
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 <jedrzej.nowacki@qt.io>
Diffstat (limited to 'coin')
-rw-r--r--coin/module_config.yaml36
1 files changed, 33 insertions, 3 deletions
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.