[cmake-developers] [CMake 0015890]: file(STRINGS ..) doesn't work on single character files.

Mantis Bug Tracker mantis at public.kitware.com
Mon Dec 21 10:43:24 EST 2015


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=15890 
====================================================================== 
Reported By:                Fredrik Björkenfors
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15890
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-12-21 10:43 EST
Last Modified:              2015-12-21 10:43 EST
====================================================================== 
Summary:                    file(STRINGS ..) doesn't work on single character
files.
Description: 
If the file passed to file(STRINGS <file> VAR) contains a single character file
VAR will be empty.

Steps to Reproduce: 
Run CMake on the attached project.

Workaround: Adding any character to the input file, including an EOL character.

Additional Information: 
If the file has less than 2 characters ReadBOM(std::istream& in) will set the
failbit and the attempt to rewind the file will fail. 
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-12-21 10:43 Fredrik BjörkenforsNew Issue                                  
 
2015-12-21 10:43 Fredrik BjörkenforsFile Added: CMake_bug.zip                  
 
======================================================================



More information about the cmake-developers mailing list