Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compatible with older versions of GCC #8

Open
dantaki opened this issue Nov 20, 2018 · 0 comments
Open

Make compatible with older versions of GCC #8

dantaki opened this issue Nov 20, 2018 · 0 comments

Comments

@dantaki
Copy link

dantaki commented Nov 20, 2018

cc1plus: error: unrecognized command line option "-std=c++11"

I cannot update gcc on my server. Do you mind amending your code so I and others with older gcc versions will be able to compile your tool please?

This might be a solution

if(CMAKE_COMPILER_IS_GNUCXX)
   SET(ENABLE_CXX11 "-std=c++11")

   EXECUTE_PROCESS(COMMAND "${CMAKE_CXX_COMPILER} -dumpversion" OUTPUT_VARIABLE GCC_VERSION)
   if (GCC_VERSION VERSION_LESS 4.7)
      SET(ENABLE_CXX11 "-std=c++0x")
   endif()

   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ENABLE_CXX11}")
endif()

https://stackoverflow.com/questions/12715005/add-c0x-support-in-cmake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant