-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for MSVC preprocessing bug
- Loading branch information
1 parent
0592bc0
commit 451245d
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
foo.cpp -Fofoo.o -W4 -WX -Wall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// This tests sccache's ability to handle a known bug in cl.exe | ||
// More information: https://github.com/mozilla/sccache/issues/1725 | ||
__pragma(warning(push)) | ||
__pragma(warning(disable: 4668)) | ||
// cl.exe during compilation will correctly ignore 4668 here (undefined define) | ||
// during preprocessing, it will not ignore 4668 | ||
// sccache must explicitly ignore this warning when preprocessing (to figure out the cache key) | ||
#if UNDEFINED_MACRO_TRIGGERING_C4668 | ||
#error "This error should be unreachable" | ||
#endif | ||
__pragma(warning(pop)) | ||
|
||
int main() { | ||
return 0; | ||
} |