Menu
Logged-In As
ACCOUNTNot Logged In
cmake case cleanupBRL-CAD
Status: ClosedTime to complete:
48 hrs
Mentors: Sean
BRL-CAD uses the CMake build system. With that system, our build logic is defined by a lot of script code spread throughout our repository in .cmake files. The syntax of the script files is case insensitive, but we have an inconsistent use of uppercase and lowercase throughout.
This task involves updating our script code to make the logic and macro names be all lowercase. Do not make the variables lowercase.
References:
- http://cmake.org/Wiki/CMake/Language_Syntax
- http://www.cmake.org/cmake/help/syntax.html
Code:
- all CMakeLists.txt files
- all *.cmake files
This should find most:
find . \( -name \*.cmake -o -name CMakeLists.txt \)
Changes will be submitted as a single patch file with all changes. Be sure to compile successfully before and after to make sure you preserve behavior. See http://brlcad.org/wiki/Deuces on getting started.
Uploaded Work
File name/URL | File size | Date submitted | |
---|---|---|---|
cmake.patch | 1.1 MB | December 21 2012 00:52 UTC | |
cmake2.patch | 1.0 MB | December 22 2012 02:25 UTC | |
cmake3.patch | 1.0 MB | December 22 2012 20:06 UTC |
I would like to work on this task.
This task has been assigned to javamonn. You have 48 hours to complete this task, good luck!
The claim on this task has been removed, someone else can claim it now.
I would like to work on this task.
This task has been assigned to javamonn. You have 48 hours to complete this task, good luck!
When you say logic, I'm assuming you mean the actual control stuctures like "IF" and "WHILE", and not the logic contained within the conditional, like the "GREATER 10 AND..." Also, should all commands be lower case, or just the user defined macros?
Thanks for all the help,
Daniel
Everything that can be lowercase (except variables), should be lowercase. I'm kinda ambivalent about the logic within the conditional but would lean towards it also being lowercase if cmake doesn't care. Feel free to try just one file first and we can look if there are any exceptions.
Note that something like these might help:
http://www.cmake.org/pipermail/cmake/2008-May/021900.html (emacs auto-cleanup)
http://www.cmake.org/pipermail/cmake/2008-May/021752.html (shell script)
https://issues.itk.org/jira/browse/ITK-1474 (vim cleanup)
Be sure to make sure it compiles cleanly before changing anything, then making changes and making sure the compile still works.. ;)
The work on this task is ready to be reviewed.
I converted everything that I could to lower case. Arguements in cmake are case sensitive so I left them alone. All commands and macros, both user defined and system were changed to lower case. Everything compiles fine on my end. Let me know if anything should be changed.
Thanks,
Daniel
Melange has detected that the deadline has passed and no more work can be submitted. The submitted work should be reviewed.
Hi Daniel, Impressive! How'd you convert everything so quickly? How long did it take? It'll take a lil bit to verify a few things but it looks good on a quick read through.
I've found several problems in all the instances of ResolveCompilerPaths.cmake and FindTCL.cmake where an internal option was changed in case and is incorrect. You should re-review the changes (yeah, all lines.. somewhat tedious) to make sure all are intentional, particularly the lines with MATCHES and REGEX on them. If those two exist, it's possible there are others depending on what regexes you used to update the sources.
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
The deadline of the task has been extended with 2 days and 0 hours.
The work on this task is ready to be reviewed.
Yeah, I saw that earlier, I wasn't sure if it was going to cause problems. I fixed it so those aren't edited anymore, which is how it should've been in the first place. I apologize about that. But yeah, regex's are perfect for this sort of task. Let me know if there are any other problems.
Thanks,
Daniel
a quick grep pass shows there're still a handful to be converted.
I used this command: (find . -name 'CMakeLists.txt' | grep -v '/src/other/' ; find misc/CMake -type f | grep -v '\.\(c\|in\)$') | xargs grep '^[^"#]*[A-Z][\t ]*('
So at least that set needs to be updated, there may be others not caught by that regex as well.
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
The work on this task is ready to be reviewed.
Congratulations, this task has been completed successfully.