[cmake-developers] [CMake 0015941]: file glob case sensitivity depends on platform

Mantis Bug Tracker mantis at public.kitware.com
Fri Jan 29 05:05:48 EST 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=15941 
====================================================================== 
Reported By:                hegewald
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15941
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-01-29 05:05 EST
Last Modified:              2016-01-29 05:05 EST
====================================================================== 
Summary:                    file glob case sensitivity depends on platform
Description: 
[The OS did not fit in the above field, so here is the full version:
Mac OS 10.11.3 / SUSE Linux Enterprise Server 11 (x86_64)]

Cmakes file glob returns files regardless of the case used in the glob
expression on Mac OS (even on a case sensitive filesystem). On Linux glob
returns the files which match the case being used in the expression, as would be
returned by the ls terminal command.

Steps to Reproduce: 
Have two files where the suffix differs in case, use cmake file glob with on of
the cases used in a suffix.
Example:
# directory
src/
  foo.f90
  bar.F90

# ls on Mac
ls src/*.F*
bar.F90

# cmake on Mac
file(GLOB all_sources ${src}/*.F*
message(STATUS "all_sources: ${all_sources}")
-- all_sources: /.../src/bar.F90;/.../src/foo.f90

# ls on Linux
ls src/*.F*
bar.F90

# cmake on Linus
file(GLOB all_sources ${src}/*.F*
message(STATUS "all_sources: ${all_sources}")
-- all_sources: /.../src/bar.F90
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-01-29 05:05 hegewald       New Issue                                    
2016-01-29 05:05 hegewald       File Added: CMakeLists.txt                    
======================================================================



More information about the cmake-developers mailing list