Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
aewallin committed Jul 26, 2019
1 parent b6698f6 commit c3f3555
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gcc_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ if(CMAKE_COMPILER_IS_GNUCXX)
${CMAKE_CXX_COMPILER}
ARGS --version
OUTPUT_VARIABLE _compiler_output)
string(REGEX REPLACE ".*([0-9]\\.[0-9]\\.[0-9]).*" "\\1"
string(REGEX REPLACE ".*([0-9]\\.[0-9]\\.[0-9]).*" "\\1"
gcc_compiler_version
"${_compiler_output}"
)

message(STATUS "C++ compiler version: ${gcc_compiler_version} [${CMAKE_CXX_COMPILER}]")

IF(${gcc_compiler_version} MATCHES ".*4\\.[6789]\\.[0-9].*")
#MESSAGE("gcc >= 4.6")
set(GCC_4_6 TRUE)
#MESSAGE("gcc >= 4.6")
set(GCC_4_6 TRUE)
ELSE(${gcc_compiler_version} MATCHES ".*4\\.[6789]\\.[0-9].*")
#MESSAGE("gcc < 4.6")
set(GCC_4_6 FALSE)
#MESSAGE("gcc < 4.6")
set(GCC_4_6 FALSE)
ENDIF(${gcc_compiler_version} MATCHES ".*4\\.[6789]\\.[0-9].*")

endif(CMAKE_COMPILER_IS_GNUCXX)

0 comments on commit c3f3555

Please sign in to comment.