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>bb10
parent
3607ff064b
commit
65d5e725d3
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue