(sorry for the long post...)
David Williams wrote:
I have made some progress here - I used the links you provided to install the libraries and executables to the same folder on Windows. It is better now
Good, I'm glad that was the main problem and not something terribly complicated.
David Williams wrote:
It did successfully submit a CDash result but it seems the tests didn't actually run. I'll look into this when I get a chance.
I see the submission. Looking at
the test report it looks like it simply didn't find the test binary. This is due to a mismatch caused by the binaries being built in a different place and the
CREATE_TEST() macro I made not knowing this. I'll need to work out which variable really describes where the files are written.
I'll need to read into the various bug reports about this stuff but it looks like your problem with
RUNTIME_OUTPUT_DIRECTORY not working in Windows
might be fixed in CMake 2.8. Furthermore, it might get even easier in 2.8.1 (see
this bug) which should be released some time very soon. If you get a chance, could you try it with 2.8 to see if you fare any better? We can always raise the required version if necessary (and will need to for VS2010 anyway).
David Williams wrote:
Actually, it only works properly in release mode. In debug mode we append the '_d' to the end of the library name and I think this is why it doesn't find it.
Yes, and also it's probably going to try to put it in a
/Debug directory or something given the chance
David Williams wrote:
Do you think we should keep this '_d' thing? In some ways it is nice to manually tell debug and release versions apart, though I'm not sure I've actually needed it in practice. Some other projects do this, but on the other hand should we really care about the difference? I think they should be interchangeable anyway...
The two should be binary compatible, yes. I guess that really, most of the time, you simply use one or the other and don't switch between the two that often. If they're still being output to a Debug or Release directory then I guess the _d suffix isn't really necessary. It could simplify things to get rid of it.
David Williams wrote:
Does Linux have any standard approach to handling release vs. debug libraries?
In Linux we don't tend to bother with 'debug' libraries. Any library we get from our distro will have been build with the
RelWithDebInfo CMake build type which sets
-O2 -g. This means that it's optimised but not to the point of mangling line numbers and symbols and the
-g means that debug symbols are included. Then, before it's all put into an RPM, the debug symbols are stripped out and put into a separate package. This way we can run with almost fully optimised libraries but can get the debuginfo if we really need it.
The
Debug build type will just set
-g so there is 'no' optimisation in order to get most accurate symbol locations. This isn't used much since
RelWithDebInfo is usually fine.
Finally,
Release sets the flags
-O3 -DNDEBUG which obviously optimises more but also sets
-DNDEBUG which turns off asserts etc.
So really the only difference between release and debug (RelWithDebInfo) builds is a little bit of optimisation, inclusion of debug symbols and the lack of asserts. Because of this I think that most people developing against a copy of PolyVox they built themselves would build PolyVox with
RelWithDebInfo and then only switch to a release build if they were then going to include the library (static or shared) along with their project.
I don't know how that all differs from Windows though? You can see what would be set for the different configurations by looking in
ccmake or
cmake-gui at the
CMAKE_CXX_FLAGS_<config> variables.