| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0007487 | CMake | CMake | public | 2008-08-13 17:47 | 2016-06-10 14:30 | ||||
| Reporter | Jason Spiro | ||||||||
| Assigned To | Brad King | ||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | CMake-2-6 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0007487: Please change FILE(GLOB) not to find hidden files or directories | ||||||||
| Description | When I do FILE(GLOB cpp_files *.cpp), CMake finds all *.cpp files. Sadly, this includes Emacs and XEmacs lockfiles[1]. These files are saved in the same directory as the normal source files, but they are dotfiles (Unix hidden files) whose names start with dot-pound, e.g.: .#main.cpp I do not want CMake to find those files, and I assume that most programmers think likewise.[2] Please change the GLOB command[3] so that it does not find files or directories whose name starts with a dot. Cheers, -Jason Footnotes: ^ [1]. http://tekman.livejournal.com/79598.html [^] ^ [2]. I can only think of one case where programmers *do* need to think about dotfiles: C and C++ programmers who use GNU Libtool, in the cases where they need to look inside the hidden directories that Libtool creates. You can read more about these hidden directories at http://makepp.sourceforge.net/1.40.1/makepp_scanning.html#libtool. [^] But I think it would be rare for anyone to use GLOB to try to find things inside Libtool hidden directories. They probably only want a few libraries from inside there, not dozens of files like I assume most GLOB users would want. So they are much more likely to specify the individual libraries they want by typing their full filenames. ^ [3]. Tip: The FILE(GLOB) command is defined by cmFileCommand::HandleGlobCommand. That method uses calls kwsys/Glob.cxx to do most of the work. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0013004) Jason Spiro (reporter) 2008-08-13 18:07 |
Boost.Build, a competitor to CMake, has the same problem. I told them too, at http://zigzag.cs.msu.su/boost.build/ticket/199 [^] |
|
(0013087) Brad King (manager) 2008-08-19 16:51 |
We recommend against using file(GLOB) to collect a list of source files. If you add a source file, you should explicitly update CMakeLists.txt file to list it. Then CMake will automatically re-run and handle the dependencies. |
|
(0030499) Brad King (manager) 2012-08-13 10:36 |
Sending issues I'm not actively working on to the backlog to await someone with time for them. If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^] It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on. |
|
(0041444) Kitware Robot (administrator) 2016-06-10 14:27 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2008-08-13 17:47 | Jason Spiro | New Issue | |
| 2008-08-13 18:07 | Jason Spiro | Note Added: 0013004 | |
| 2008-08-19 16:45 | Bill Hoffman | Status | new => assigned |
| 2008-08-19 16:45 | Bill Hoffman | Assigned To | => Brad King |
| 2008-08-19 16:51 | Brad King | Note Added: 0013087 | |
| 2012-08-13 10:36 | Brad King | Status | assigned => backlog |
| 2012-08-13 10:36 | Brad King | Note Added: 0030499 | |
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041444 | |
| 2016-06-10 14:27 | Kitware Robot | Status | backlog => resolved |
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
| 2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |