Skip to content

Commit cb24e95

Browse files
authored
[SYCLomatic][CMake] Remove the option "-extended-lambda" in the migrated CMake script (#2871)
Signed-off-by: chenwei.sun <chenwei.sun@intel.com>
1 parent b2cf71f commit cb24e95

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: rm -rf %T && mkdir -p %T
2+
// RUN: cd %T
3+
// RUN: cp %S/input.cmake ./input.cmake
4+
// RUN: dpct -in-root ./ -out-root out ./input.cmake --migrate-build-script-only --cuda-include-path="%cuda-path/include" --rule-file=%T/../../../../../../../extensions/cmake_rules/cmake_script_migration_rule_optional.yaml
5+
// RUN: diff --strip-trailing-cr %S/expected.txt %T/out/input.cmake >> %T/diff.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(CUDA_FLAGS -ffast-math )
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(CUDA_FLAGS -use_fast_math -extended-lambda)

clang/tools/dpct/extensions/cmake_rules/cmake_script_migration_rule.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2923,10 +2923,10 @@
29232923
In: -Xcudafe=${arg}
29242924
Out: ""
29252925

2926-
- Rule: rule_extended_lambda_remove
2926+
- Rule: rule_dash_dash_extended_lambda_remove
29272927
Kind: CMakeRule
29282928
Priority: Fallback
2929-
CmakeSyntax: extended_lambda_remove
2929+
CmakeSyntax: dash_dash_extended_lambda_remove
29302930
In: ${func_name}(${value})
29312931
Out: ${func_name}(${value})
29322932
Subrules:
@@ -2935,6 +2935,18 @@
29352935
In: --extended-lambda
29362936
Out: ""
29372937

2938+
- Rule: rule_dash_extended_lambda_remove
2939+
Kind: CMakeRule
2940+
Priority: Fallback
2941+
CmakeSyntax: dash_extended_lambda_remove
2942+
In: ${func_name}(${value})
2943+
Out: ${func_name}(${value})
2944+
Subrules:
2945+
value:
2946+
MatchMode: Full
2947+
In: -extended-lambda
2948+
Out: ""
2949+
29382950
- Rule: rule_expt_relaxed_constexpr_remove
29392951
Kind: CMakeRule
29402952
Priority: Fallback

0 commit comments

Comments
 (0)