[cmake-developers] [CMake 0015369]: file(STRINGS file VAR) fails to read entire file

Mantis Bug Tracker mantis at public.kitware.com
Fri Jan 23 14:32:03 EST 2015


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=15369 
====================================================================== 
Reported By:                Joakim Söderberg
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15369
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2015-01-23 14:32 EST
Last Modified:              2015-01-23 14:32 EST
====================================================================== 
Summary:                    file(STRINGS file VAR) fails to read entire file
Description: 
I am experiencing some weird issues with file(STRINGS. 

It fails to read my entire file. The file is 2529 lines long, but CMake only
read 1885. Or well it reads the entire file, but then stops splitting it up into
lines, instead the last list entry consists of all the lines between 1885-2529.

Steps to Reproduce: 
cmake -DFILE=thefile.gcov -P testscript.cmake


testscript:

file(STRINGS ${FILE} LIST)
list(LENGTH LIST LIST_COUNT)
message("${LIST_COUNT}")

Additional Information: 
I have not been able to test with a later CMake yet. But I hope there is some
workaround for this for older versions as well.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-01-23 14:32 Joakim SöderbergNew Issue                                    
2015-01-23 14:32 Joakim SöderbergFile Added: thefile.gcov                     
======================================================================



More information about the cmake-developers mailing list