Hello,
I tried to compile OSRM on a Debian Wheezy 7.10 machine but unfortunately failed.
The issue seems to be that CMake is too old, but it's not really mentioned on the Wiki-Page about building that there might be issues on Wheezy.
Anyway, this is what cmake prints:
$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- Building on a 64 bit system
-- Configuring OSRM in release mode
-- LTO working
-- Disabling LTO on GCC < 4.9.0 since it is broken, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038
-- Setting linker optimizations
-- Boost version: 1.49.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- iostreams
-- program_options
-- regex
-- system
-- thread
-- Found Intel TBB
-- TBB interface version: 6000
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so
-- Found Lua52: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.5")
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- Performing Test LUABIND_WORKS
-- Performing Test LUABIND_WORKS - Success
-- Luabind/Lua5.2 combination working with /usr/lib/x86_64-linux-gnu/liblua5.1.so
-- Looking for STXXL...
-- Found STXXL: /usr/lib/libstxxl.so
-- OpenMP support found. Linking just in case for stxxl
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Boost version: 1.49.0
-- Found the following Boost libraries:
-- unit_test_framework
CMake Error at src/benchmarks/CMakeLists.txt:9 (target_include_directories):
Unknown CMake command "target_include_directories".
-- Configuring incomplete, errors occurred!
You are correct, it seems like target_include_directories is not in CMake 2.8.9:
https://cmake.org/cmake/help/v2.8.9/cmake.html
but only in 3.0+:
https://cmake.org/cmake/help/v3.0/command/target_include_directories.html
Quick workaround for you:
target_include_directories to include_directories and remove the first argument (the target)./bootstrap && make && make install in order to install it to /usr/local/)"Fixed" in https://github.com/Project-OSRM/osrm-backend/commit/87f00d2c4c2403dd98d81f7206d35ce20d26c943 :) we rely on target_include_directories since it's an essential feature that allows us to not clobber the global namespace with includes we only require in specific targets.
I will add a note to the Wiki.