File tree 5 files changed +40
-5
lines changed
5 files changed +40
-5
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,32 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
19
19
"CORE"
20
20
)
21
21
else ()
22
+ find_program (CLANG_EXISTS "clang" )
23
+ find_program (GCC_EXISTS "gcc" )
24
+ if (CLANG_EXISTS AND GCC_EXISTS)
25
+ add_test_pl_profile(
26
+ "ansi-c-clang"
27
+ "$<TARGET_FILE:goto-cc> --native-compiler clang"
28
+ "-C;-s;ansi-c-clang"
29
+ "CORE"
30
+ )
31
+ add_test_pl_profile(
32
+ "ansi-c-gcc"
33
+ "$<TARGET_FILE:goto-cc> --native-compiler gcc"
34
+ "-C;-X;fake-gcc-version;-s;ansi-c-gcc"
35
+ "CORE"
36
+ )
37
+ add_test_pl_profile(
38
+ "ansi-c-fake-gcc"
39
+ "$<TARGET_FILE:goto-cc>"
40
+ "-C;-I;fake-gcc-version;-s;ansi-c-fake-gcc"
41
+ "CORE"
42
+ )
43
+ else ()
22
44
add_test_pl_tests(
23
45
"$<TARGET_FILE:goto-cc>"
24
46
)
47
+ endif ()
25
48
26
49
add_test_pl_profile(
27
50
"ansi-c-c++-front-end"
Original file line number Diff line number Diff line change @@ -23,13 +23,25 @@ endif
23
23
endif
24
24
25
25
test :
26
- @../test.pl -e -p -c $(exe ) $(excluded_tests )
26
+ if which gcc && which clang ; then \
27
+ ../test.pl -e -p -c " $( exe) --native-compiler clang" $(excluded_tests ) && \
28
+ ../test.pl -e -p -c " $( exe) --native-compiler gcc" $(excluded_tests ) -X fake-gcc-version && \
29
+ ../test.pl -e -p -c $(exe ) $(excluded_tests ) -I fake-gcc-version ; \
30
+ else \
31
+ ../test.pl -e -p -c $(exe ) $(excluded_tests ) ; \
32
+ fi
27
33
ifneq ($(BUILD_ENV_ ) ,MSVC)
28
34
@../test.pl -e -p -c "$(exe) -xc++ -D_Bool=bool" -I test-c++-front-end -s c++-front-end $(excluded_tests)
29
35
endif
30
36
31
37
tests.log : ../test.pl
32
- @../test.pl -e -p -c $(exe ) $(excluded_tests )
38
+ if which gcc && which clang ; then \
39
+ ../test.pl -e -p -c " $( exe) --native-compiler clang" $(excluded_tests ) && \
40
+ ../test.pl -e -p -c " $( exe) --native-compiler gcc" $(excluded_tests ) -X fake-gcc-version && \
41
+ ../test.pl -e -p -c $(exe ) $(excluded_tests ) -I fake-gcc-version ; \
42
+ else \
43
+ ../test.pl -e -p -c $(exe ) $(excluded_tests ) ; \
44
+ fi
33
45
ifneq ($(BUILD_ENV_ ) ,MSVC)
34
46
@../test.pl -e -p -c "$(exe) -xc++ -D_Bool=bool" -I test-c++-front-end -s c++-front-end $(excluded_tests)
35
47
endif
Original file line number Diff line number Diff line change 1
- CORE gcc-only
1
+ CORE gcc-only fake-gcc-version
2
2
gcc-4.c
3
3
--native-compiler ./fake-gcc-4
4
4
^EXIT=0$
Original file line number Diff line number Diff line change 1
- CORE gcc-only
1
+ CORE gcc-only fake-gcc-version
2
2
gcc-5.c
3
3
--native-compiler ./fake-gcc-5
4
4
^EXIT=0$
Original file line number Diff line number Diff line change 1
- CORE gcc-only
1
+ CORE gcc-only fake-gcc-version
2
2
gcc-7.c
3
3
--native-compiler ./fake-gcc-7
4
4
^EXIT=0$
You can’t perform that action at this time.
0 commit comments