Closed ajneu closed 8 years ago
I've modified the logic of using the old way of setting flags. Please review.
I fixed, the reported problem. Albert, can you please test it in your environment? I'm still using Ubuntu 14.04 as my primary development environment with cmake 2.8.12 and gcc 4.8, haven't had a chance to migrate to Ubuntu 16.04 yet.
It's working nicely. I'm using Debian Stretch (aka Debian Testing... which is the testing release of debian), setup as shown here: https://github.com/ajneu/gnu_linux_cpp
The develop branches are working nicely! All good. Debian Stretch's cmake is 3.5.2 (ref). I also tested with the latest cmake 3.6+ (compiled from source as show at the bottom of this comment) and that also works.
haven't had a chance to migrate to Ubuntu 16.04 yet.
You could also set up a docker container. Or use a schroot. (If I find some time, I will look at these methods more closely myself, as they allow one to easily switch between distros and releases)
Hi,
currently the project embxx_on_rpi will fail when using develop branch. Try it!
The reason, is embxx/cmake/CompilerOptionsFuncs.cmake (on branch develop), where
set (CMAKE_CXX_STANDARD 11)
is not taken(!!!), in the special case when the cross-compiler if forced withwhich occurs in the project embxx_on_rpi.
This is a problem that's described in the cmake bugtracker here.
The solution is to still use the old-style
embxx_add_cxx_flags("--std=c++0x")
, in cases where we are cross-compiling: Fixed in this pull-request -> Here cross-compilation can be nicely detected with the condition(DEFINED CMAKE_CROSSCOMPILING)
, whereCMAKE_CROSSCOMPILING
will be automatically set whenCMAKE_SYSTEM_NAME
is set (ref), which is the case in embxx_on_rpi.(For CMake Version 3.6 and newer,
set (CMAKE_CXX_STANDARD 11)
will work, since one does not need to force the compiler, but can then use:set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
). .
The other change in the commit is:
test_std_streambuf_access
does not depend on boost.