Skip to content
Snippets Groups Projects
Commit dcc617fc authored by Lynx Linden's avatar Lynx Linden
Browse files

Made the gcc version number checking more robust in llaudio's

CMakeFiles.txt file. Previously it checked for a narrow range of gcc
versions via a regex:

      if (${CXX_VERSION} MATCHES "4.[23]")

Now we explicit check for any version >= 4.2:

      if (${CXX_VERSION_NUMBER} GREATER 419)
parent 5bff5d28
No related branches found
No related tags found
No related merge requests found
...@@ -119,14 +119,14 @@ if (LINUX) ...@@ -119,14 +119,14 @@ if (LINUX)
endif (${GXX_VERSION} STREQUAL ${CXX_VERSION}) endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
# Let's actually get a numerical version of gxx's version # Let's actually get a numerical version of gxx's version
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION ${CXX_VERSION}) STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION})
# gcc 4.3 and above don't like the LL boost and also # gcc 4.3 and above don't like the LL boost and also
# cause warnings due to our use of deprecated headers # cause warnings due to our use of deprecated headers
if(${CXX_VERSION} GREATER 429) if(${CXX_VERSION_NUMBER} GREATER 429)
add_definitions(-Wno-parentheses) add_definitions(-Wno-parentheses)
set(CMAKE_CXX_FLAGS "-Wno-deprecated ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "-Wno-deprecated ${CMAKE_CXX_FLAGS}")
endif (${CXX_VERSION} GREATER 429) endif (${CXX_VERSION_NUMBER} GREATER 429)
# End of hacks. # End of hacks.
......
...@@ -60,11 +60,11 @@ if (FMOD) ...@@ -60,11 +60,11 @@ if (FMOD)
) )
if (LINUX) if (LINUX)
if (${CXX_VERSION} MATCHES "4.[23]") if (${CXX_VERSION_NUMBER} GREATER 419)
set_source_files_properties(llaudioengine_fmod.cpp set_source_files_properties(llaudioengine_fmod.cpp
llstreamingaudio_fmod.cpp llstreamingaudio_fmod.cpp
COMPILE_FLAGS -Wno-write-strings) COMPILE_FLAGS -Wno-write-strings)
endif (${CXX_VERSION} MATCHES "4.[23]") endif (${CXX_VERSION_NUMBER} GREATER 419)
endif (LINUX) endif (LINUX)
endif (FMOD) endif (FMOD)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment