summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@qt.io>2019-07-02 16:36:33 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-03 06:06:30 +0000
commitc5ec218ae2e3c98e5201530880f0a2dbd4e241b3 (patch)
treea518b946f7c0b4e2b4319bedde11ba6bf2ee1e85
parent91032a276a642f39df70ffabaab6e1ed9d8eccac (diff)
Add shared instructions that handles CMAKE_C[XX]_COMPILERHEADmaster
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 <jedrzej.nowacki@qt.io>
-rw-r--r--README3
-rw-r--r--coin/instructions/set_cmake_c_cxx_compiler.yaml30
2 files changed, 32 insertions, 1 deletions
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