DCPROGS / HJCFIT

Full maximum likelihood fitting of a mechanism directly to the entire sequence of open and shut times, with exact missed events correction.
GNU General Public License v3.0
9 stars 4 forks source link

Feature/c++11 configuration #73

Closed raquelalegre closed 8 years ago

raquelalegre commented 8 years ago

Done using CookOff now.

jenshnielsen commented 8 years ago

This fails on MountainLion (10.8) because the code to switch C++ stdlib from libstdc++ to libc++ is missing. The code was removed in https://github.com/UCL/GreatCMakeCookOff/issues/4 We could add it back in a more sophisticated version but I think it would be better to just drop this old OS version. To do this we would need to change the Jenkins job to not run on OSX 10.8 but only the 10.9 machines.

CC @mdavezac

Never the less we should mark type_traits as required so that it fails in the cmake step

jenshnielsen commented 8 years ago

I suggest we change the feature check to something like what is in k-wave https://github.com/UCL/k-Wave/blob/master/src/cmake_files/language_setup.cmake

Here everything after required is needed to compile the code everything before is optional: Below all the features are required but we need to check which are optional

cxx11_feature_check(
                    REQUIRED auto lambda static_assert rvalue_references decltype
                    enable_if type_traits trivial_type_traits noexcept constexpr unique_ptr 
                    shared_ptr constructor_delegate initialization)
jenshnielsen commented 8 years ago

Looking at the code I think that at least the following should be optional

cxx11_feature_check(constexpr unique_ptr random_device constructor_delegate
                    REQUIRED auto lambda static_assert rvalue_references decltype
                    enable_if type_traits trivial_type_traits noexcept 
                    shared_ptr initialization)
jenshnielsen commented 8 years ago

The code is using HAS_CXX11_TYPETRAITS and HAS_CXX11_TRIVIALTYPETRAITS

This should be changed to HAS_CXX11_TYPE_TRAITS and HAS_CXX11_TRIVIAL_TYPE_TRAITS which are the variables that cookoff uses

raquelalegre commented 8 years ago

Working on these changes right now. enable_if also seems to need to be optional, will keep on testing.

[edit] ... not very sure about this, so reverting the change.

raquelalegre commented 8 years ago

retest this please

jenshnielsen commented 8 years ago

Looks like trivial_type_traits is not required

mdavezac commented 8 years ago

Actually, it doesn't look like enable_if is used anywhere (which is a bit surprising to me, but whatever). So you should be able to remove it entirely.

However, it is not unlikely you will need it before the end of the project, for the arbitrary precision bit :)

jenshnielsen commented 8 years ago

Apart from one inline comment I think this is ready to go :+1:

raquelalegre commented 8 years ago

Which inline comment?

jenshnielsen commented 8 years ago

The one that made you do 2719151 :smile:

jenshnielsen commented 8 years ago

retest this please

jenshnielsen commented 8 years ago

Great stuff :smile: