[cmake-developers] [CMake 0015066]: MSVC level 3 warning in test code

Mantis Bug Tracker mantis at public.kitware.com
Wed Aug 6 17:58:30 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15066 
====================================================================== 
Reported By:                Ken Moreland
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15066
Category:                   CTest
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-08-06 17:58 EDT
Last Modified:              2014-08-06 17:58 EDT
====================================================================== 
Summary:                    MSVC level 3 warning in test code
Description: 
I like to compile my code in MSVC with level 3 warnings on (/W3 compiler flag),
but this causes problems with code generated with the create_test_sourcelist()
command. (That is, the code in TestDriver.cxx.in.) This code uses the functions
strcpy and scanf, and the MSVC compiler gives an error for using each of them
because each are notorious for leading to security problems.

Although the use of each of these is correct, TestDriver.cxx.in should be
changed to suppress the warning in some way. Either the code should use "safe"
alternatives for these functions or the warning should be disabled with
something like "#pragma warning(disable : 4996)".
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-08-06 17:58 Ken Moreland   New Issue                                    
======================================================================



More information about the cmake-developers mailing list