Closed claremacrae closed 3 years ago
What I don't understand is that only gives a warning, and not an error, when building the main ApprovalTests project on Visual Studio
Since I moved the implementations of approval test headers to .cpp projects, the .cpp files are compiled by ApprovalTests/CMakeLists.txt
- which does not contain this line:
include(WarningsAsErrors)
This is fixed in 10.2.1
The error is:
d:\a\ApprovalTests.cpp.StarterProject\ApprovalTests.cpp.StarterProject\lib\ApprovalTests.v.10.2.0.hpp(4825,18): error C4996: 'gmtime': This function or variable may be unsafe. Consider using gmtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [d:\a\ApprovalTests.cpp.StarterProject\ApprovalTests.cpp.StarterProject\visual-studio-2019\StarterProject2019.vcxproj]
What I don't understand is that only gives a warning, and not an error, when building the main ApprovalTests project on Visual Studio, where I also expected warnings to be treated as errors - but DateUtils.cpp only generates a warning for C4996
Example failed build: https://github.com/approvals/ApprovalTests.cpp.StarterProject/runs/950564893?check_suite_focus=true#step:9:14