squirrel icon indicating copy to clipboard operation
squirrel copied to clipboard

std=c++0x should be updated to std=c++11 or std=c++14

Open graph opened this issue 6 years ago • 3 comments

unless there is backwards compatibility concerns that option in the main cmake file should be updated. Or perhaps also check and set CMAKE_CXX_STANDARD instead of specifying the command option manually and let cmake take care of it across compilers and platforms. Perhaps also set the following as follows:

set(CMAKE_CXX_STANDARD           14)
set(CMAKE_CXX_STANDARD_REQUIRED  ON)
set(CMAKE_CXX_EXTENSIONS        OFF)

graph avatar Jul 12 '19 17:07 graph

Why? Why shouldn't code that only needs c++0x manifest that it only needs c++0x? Removing the manifest completely and letting cmake use the defaults makes sense to me though.

zeromus avatar Jul 12 '19 17:07 zeromus

C++0x is c++11 before it got it's name, now that c++11 is out I think it's sensible to update that option. I think just letting cmake handle it and using the cmake variables is best. I agree updating to c++14 is not needed, and doesn't matter. I also said if comparability is not an issue as I don't know the compatibility constraints, on embedded systems some compilers might not get updates and not understand c++11 option or do weird things. If there are no issues then it should be simplified and let cmake handle setting appropriate options.

I totally understand if squirrel team doesn't want to make this change in order to keep things backward compatible. Just make a note and close the issue. I was just suggesting this to keep things updated.

graph avatar Jul 12 '19 18:07 graph

Please see #187. I've made a bunch of improvements to the CMake scripts, and this is one of them.

kyleedwardsny avatar Jul 30 '19 04:07 kyleedwardsny