openmicroscopy/openmicroscopy — pull request #2797 by rleigh-dundee (2014-07-12 13:07:35+00:00)
Title: OmeroCpp: switch build system from scons to cmake

This PR has been opened before. The main change since the last PR is that the cmake is (optionally) now invoked through ant to act as a drop-in replacement for the scons build.

Testing:

- the existing build-cpp target will continue to work, as will targets in `components/tools/OmeroCpp`
- still requires `build-default` running first due to the broken/missing dependencies at the toplevel
- additional release-cpp target to install and zip up the binary build; embedded os/version/architecture strings could possibly be improved; currently uses the ant os.* variables.
- also buildable by running `cmake /path/to/sourcetree`; this gives the end user full control over the cmake invocation, which is absent/restricted when running via ant. While the ant targets are probably best for integration testing, end users will want to use this to be able to properly customise and install it.
- unfortunately due to unrelated Ice issues, it's not possible to fully test on Windows at this time; may need some portability tweaks once the Ice issues on Windows are addressed.

Main differences:
- if gtest is present (set GTEST_ROOT), tests are built
- examples are built (scons build was broken for some time and not default)
- much more flexible compiler and system detection and adaption e.g. for detecting and enabling threading
- much more strict compiler warnings, build is rather more verbose indicating outstanding issues which need addressing separately
- the client headers and sources were split up to try to built the components of omero_client separately. This didn't work, but most of the logic has been retained to make any future work simpler; the history is also retained so this can be entirely backed out if desired.
- OMERO.cpp source zip is no longer produced; the build is done entirely in the source tree