Various fixes to allow cross-compilation to work. Now, when crosscompiling, the system expects CMAKE_TOOLCHAIN_FILE to be set.
Fixed compilation for the testing directory when crosscompiling