|
14 | 14 | # RUN: --cmake-define FOO=BAR \
|
15 | 15 | # RUN: -D BAR=BAZ \
|
16 | 16 | # RUN: &> %t.cmake-cache.log
|
17 |
| -# RUN: FileCheck --check-prefix CHECK-CACHE < %t.cmake-cache.log %s |
18 |
| -# CHECK-CACHE: Execute: {{.*}}cmake -DCMAKE_CXX_COMPILER:FILEPATH={{.*}}/FakeCompilers/clang++-r154331 -DCMAKE_C_COMPILER:FILEPATH={{.*}}FakeCompilers/clang-r154331 -C {{.*}}/Release.cmake {{.*}}-DFOO=BAR{{.*}}-DBAR=BAZ |
| 17 | + |
| 18 | +# Check CMAKE_C_COMPILER and CMAKE_CXX_COMPILER comes first, followed by cmake |
| 19 | +# options. This is verified by checking that: |
| 20 | +# 1) there's 2 cmake compiler definition followed by the -C option |
| 21 | +# 2) each of the cmake compiler definition only accepts the other cmake |
| 22 | +# compiler definition between cmake and itself |
| 23 | +# RUN: FileCheck --check-prefix CHECK-CACHE1 < %t.cmake-cache.log %s |
| 24 | +# CHECK-CACHE1: Execute: {{.*}}cmake -DCMAKE_C{{(XX)?}}_COMPILER:FILEPATH={{.*}}/FakeCompilers/clang{{(\+\+)?}}-r154331 -DCMAKE_C{{(XX)?}}_COMPILER:FILEPATH={{.*}}/FakeCompilers/clang{{(\+\+)?}}-r154331 -C {{.*}}/Release.cmake |
| 25 | +# RUN: FileCheck --check-prefix CHECK-CACHE2 < %t.cmake-cache.log %s |
| 26 | +# CHECK-CACHE2: Execute: {{.*}}cmake {{(-DCMAKE_CXX_COMPILER:FILEPATH=.*/FakeCompilers/clang\+\+-r154331 )?}}-DCMAKE_C_COMPILER:FILEPATH={{.*}}/FakeCompilers/clang-r154331 |
| 27 | +# RUN: FileCheck --check-prefix CHECK-CACHE3 < %t.cmake-cache.log %s |
| 28 | +# CHECK-CACHE3: Execute: {{.*}}cmake {{(-DCMAKE_C_COMPILER:FILEPATH=.*/FakeCompilers/clang-r154331 )?}}-DCMAKE_CXX_COMPILER:FILEPATH={{.*}}/FakeCompilers/clang++-r154331 |
| 29 | + |
| 30 | +# RUN: FileCheck --check-prefix CHECK-CACHE4 < %t.cmake-cache.log %s |
| 31 | +# CHECK-CACHE4: Execute: {{.*}}cmake {{(.+ )?}}-DFOO=BAR |
| 32 | +# RUN: FileCheck --check-prefix CHECK-CACHE5 < %t.cmake-cache.log %s |
| 33 | +# CHECK-CACHE5: Execute: {{.*}}cmake {{(.+ )?}}-DBAR=BAZ |
19 | 34 |
|
20 | 35 | # RUN: rm -rf %t.SANDBOX
|
21 | 36 | # Check a run of test-suite using a invalid cmake cache
|
|
29 | 44 | # RUN: --use-lit %S/Inputs/test-suite-cmake/fake-lit \
|
30 | 45 | # RUN: --cmake-cache Debug \
|
31 | 46 | # RUN: &> %t.cmake-cache2.err || true
|
32 |
| -# RUN: FileCheck --check-prefix CHECK-CACHE2 < %t.cmake-cache2.err %s |
33 |
| -# CHECK-CACHE2: Could not find CMake cache file |
| 47 | +# RUN: FileCheck --check-prefix CHECK-CACHE6 < %t.cmake-cache2.err %s |
| 48 | +# CHECK-CACHE6: Could not find CMake cache file |
0 commit comments