← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~hjd/widelands/additional-compilers into lp:widelands

 

>For GCC 4.7, see the following discussion:

I agree :)

Memo to self: remember to update the minimum required versions on https://wl.widelands.org/wiki/BuildingWidelands/ once this lands.

Diff comments:

> 
> === modified file 'CMakeLists.txt'
> --- CMakeLists.txt	2016-12-04 14:32:55 +0000
> +++ CMakeLists.txt	2017-02-13 18:13:48 +0000
> @@ -26,8 +26,8 @@
>  wl_set_if_unset(WL_INSTALL_DATADIR "./data")
>  
>  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
> -  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
> -    message(FATAL_ERROR "Widelands needs GCC >= 4.7 to compile.")
> +  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
> +    message(FATAL_ERROR "Widelands needs GCC >= 4.8 to compile.")
>    endif()
>  elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
>    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.2)

Hm... the oldest version we build with on Travis is 3.4. Should this be changed as well, or is that because older versions aren't available?

> @@ -139,19 +139,8 @@
>       wl_add_flag(WL_GENERIC_CXX_FLAGS "-fext-numeric-literals")

The text above isn't shown (how tedious), but this is the full version:
```
  if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8))
     # Because of: https://svn.boost.org/trac/boost/ticket/9240.
     wl_add_flag(WL_GENERIC_CXX_FLAGS "-fext-numeric-literals")
  endif()
```

Apart from the cumbersome if-check (which could be removed), it looks like this issue has been resolved in Boost 1.54 and later. I haven't verified it, but any thoughts on whether this workaround should be kept?

>    endif()
>  
> -  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
> -    # g++-4.7 complains otherwise about <:: not being a valid token in
> -    # unique_ptr<::Something>. Since this is common style in c++ though, we'd
> -    # rather have it swallow this frog for us.
> -    wl_add_flag(WL_GENERIC_CXX_FLAGS "-fpermissive")
> -  endif()
> -
>    wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wall")
> -  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
> -    wl_add_flag(WL_COMPILE_DIAGNOSTICS "-pedantic")
> -  else()
> -    wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wpedantic")
> -  endif()
> +  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wpedantic")
>    wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wdeprecated-declarations")
>    wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wextra")
>    wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wformat")


-- 
https://code.launchpad.net/~hjd/widelands/additional-compilers/+merge/316258
Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/additional-compilers into lp:widelands.


References