summaryrefslogtreecommitdiff
path: root/CC/foreign/cmake/EXPRESSIONS
diff options
context:
space:
mode:
authorSascha Roloff <sascha.roloff@huawei.com>2023-05-15 18:50:20 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-05-16 16:07:31 +0200
commitdb9ae6e0367c5dac8b0d37da00fe217e6b203af1 (patch)
tree7f3eabef460f43c84a62802a2e6770cf68b87d05 /CC/foreign/cmake/EXPRESSIONS
parent0b679c18e2fcc3f8b217a2cc5a848ed1c6d56725 (diff)
downloadrules-cc-db9ae6e0367c5dac8b0d37da00fe217e6b203af1.tar.gz
Set CMAKE_{SOURCE,BINARY}_DIR in cmake build environment
Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
Diffstat (limited to 'CC/foreign/cmake/EXPRESSIONS')
-rw-r--r--CC/foreign/cmake/EXPRESSIONS7
1 files changed, 6 insertions, 1 deletions
diff --git a/CC/foreign/cmake/EXPRESSIONS b/CC/foreign/cmake/EXPRESSIONS
index 5ff4667..8977d5a 100644
--- a/CC/foreign/cmake/EXPRESSIONS
+++ b/CC/foreign/cmake/EXPRESSIONS
@@ -169,7 +169,12 @@
, "then":
{ "type": "++"
, "$1":
- [ ["(", "set --", "cd ./install"]
+ [ [ "("
+ , "set --"
+ , "readonly CMAKE_SOURCE_DIR=\"$(pwd)/source\""
+ , "readonly CMAKE_BINARY_DIR=\"$(pwd)/build\""
+ , "cd ./install"
+ ]
, {"type": "var", "name": "post_cmds"}
, [")"]
]