The need for this is that:
- On OS X if libraries are stored in custom locations (not /usr/lib or /usr/local)
and they do not embed an rpath (which is common to not have) then the developer
needs to set DYLD_LIBRARY_PATH to ensure that osrm tools can find dependent libraries
at runtime (this is normal and common).
- But as of OS X > 10.11 DYLD_LIBRARY_PATH no longer is inherited. While it works in
the main shell when running a command like `osrm-extract` you will find that when
`osrm-extract` is run by cucumber (ruby child process) then DYLD_LIBRARY_PATH
is blocked and the command cannot start.
- So, this introduces the ability to pass in a variable that the cucumber tests will
understand and can manually forward along to ensure that DYLD_LIBRARY_PATH is respected
where it counts.
The intended usage of this is therefore:
# set the environment variable
export OSRM_SHARED_LIBRARY_PATH=${DYLD_LIBRARY_PATH}
# then run cucumber tests
cucumber -p verify
- Otherwise, currently, if osrm-extract crashes at startup then
the tests continue on and will crash many many times.
- This also tests that --help returns an exit code of zero and will
catch if this behavior ever changes or is inconsistent between
the command line programs
Phew, a lot of classes were affected by this. The rationale for the
changes are as follows:
- When a type X declares any constructor, the default constructor is
not declared, so there is no need for X() = delete there. In fact,
there is brutal difference between those two: deleted members
participate in overload resolution, but not-declared members do not!
- When a type X wants to be non-copyable (e.g. to be only movable, like
threads, unique_ptrs, and so on), you can either do it by inheriting
from boost::noncopyable (the old way), or better declare both (!) the
copy constructor _and_ the copy assignment operator as deleted:
X(X const&) = delete;
X& operator=(X const&) = delete;
We had tons of types with deleted copy constructors that were lacking
a corresponding deleted copy assignment operator, making them still
copyable and you wouldn't even notice (read: scary)!
References:
- http://accu.org/content/conf2014/Howard_Hinnant_Accu_2014.pdf
- http://www.boost.org/doc/libs/master/libs/core/doc/html/core/noncopyable.html
Note: I know, I'm quoting Hinnant's extraordinary slides a lot, but
getting the sematic right here is so incredibly important.
And includes the optional header that was transitively included by the
spirit header before. Hopefully this will speed up compile times, as the
RouteParameters header is used in a lot of translation units.
`pow(2, 16)` is not `2 << 16` but rather `1 << 16`.
With this change we cut memory usage in half for the XORFastHash's two
tables. Adapts XORFastHashStorage, memory usage reduction by factor two.