OK, I've put the patch in.
To address John T's issues:
(1) I'm not planning on a long transition period between build
systems. I'd like to get "cmake" support working properly (that this
patch had changes to the "cmake" files shows that it isn't all the way
there yet) and I'd like to get it documented. With a modicum of effort
that can be done in a few weeks.
(2) I'd seriously like to avoid code duplication. I had been
wondering about OSX and Linux common code; my primary question was what
to call the directory. "unwin" doesn't float my boat and "cmn_x11_osx"
starts to get long as well as there not being any guarantees that we'd
have half a dozen more platforms needing the same code before long.
The "freeglut_" prefixes are tradition from the days of Pawel Olszta.
I've just never seen a reason to change them.
- John F.
On 2/23/2012 9:29 AM, John Tsiombikas wrote:
There *was* a problem obviously, I'm not mad after all. Someone who said
it works on UNIX was obviously using the autotools build and not cmake.
The UNIX timing code in freeglut_main_x11.c was checking for a
HAVE_GETTIMEOFDAY macro which wasn't defined. With the attached patch it
This raises two issues which I'd like to bring forward:
1) Mistakes like these can go undetected as long as there are multiple
build systems. Some people will report test results using cmake, some
using autoconf/automake, and the only possible outcome is madness and
confusion :) So let me suggest one more time to drop the old build
systems now and make a clean break. There is no need for a transition,
if there are any new issues with the cmake build let's find them, and
fix them now.
2) The current organization will lead to code duplication.
There's nothing x11-ish about gettimeofday and timing on UNIX, and
macosx needs the same code for these things regardless of the different
window system code. There should be an src/unix/freeglut_unix_main.c
with window-system-independent UNIX code. If you agree, I'll submit a
patch moving the timing, and any other obvious bits that I can find,
Also, why do we have a freeglut_ prefix in EVERY source file? It should
be obvious that every source file in freeglut is part of freeglut,
why the extra long filenames? I suggest, if we decide to drop all
other build systems and settle on cmake, that I rename those files to
something more reasonable. Then a search and replace in CmakeLists.txt
included in the same patch should be sufficient to make sure everything
keeps building across all platforms correctly.
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
Freeglut-developer mailing list