BRL-CAD uses the CMake build system which generates project files for a variety of environments like Makefiles for *nix and MSVC projects for Windows. The build system is described with a simple CMake scripting/macro language where we tell it how to build all of BRL-CAD. When we add an external dependency, like using X11 for windowing, we add checks in this CMake scripting language to detect if X11 is available, find where it's installed, figure out what compiler flags to use, etc. When it doesn't find it (e.g., on Windows), we auto-disable that feature and tools that require that feature.
One of our optional external dependencies is the GLEW library. It should not be attempting to build GLEW when X11 isn't available but currently does.
This task is to get GLEW compiling properly so that it properly disables when it cannot be compiled (e.g., when X11 isn't available).
Provide your work as a single patch file with all changes included. See http://brlcad.org/wiki/Deuces for help getting started. You may need to manually move one of your system gl/x11 headers in order to properly test this on your own system.
File name/URL | File size | Date submitted | |
---|---|---|---|
x11_cmake.patch | 1.7 KB | December 19 2012 23:38 UTC | |
glew_x11.patch | 912 bytes | December 20 2012 02:46 UTC | |
glew_x11_dry.patch | 966 bytes | December 20 2012 20:10 UTC |
I would like to work on this task.
This task has been assigned to Cezar. You have 48 hours to complete this task, good luck!
The work on this task is ready to be reviewed.
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.
So the glew patch identifies the problem as trying to compile glew.c when we don't need to, but the fix shouldn't replicate the entire list of source files. Try to adhere to the "DRY" principle: http://en.wikipedia.org/wiki/Don't_repeat_yourself
We fail at it ourselves sometimes, but it's an important guideline to follow especially when adding new logic/code.
Also be careful of stray edits. Your first patch included a seemingly unrelated change to src/libfb/tcl.c (review changes via "svn diff" before commit is a good habit).
The work on this task is ready to be reviewed.
Congratulations, this task has been completed successfully.