Skip to content
Snippets Groups Projects
Commit 03c813c8 authored by Amin Bandali's avatar Amin Bandali Committed by Sébastien Blin
Browse files

cmake: use CMAKE_CXX_COMPILER_VERSION for checking GCC C++ version

The CMAKE_<LANG>_COMPILER_VERSION variables have been available in
CMake for many years, so let's use them.

Change-Id: I133b2bf9ea4ea5a50b178b75ca2d3b796a0574aa
parent 35b92aa3
No related branches found
No related tags found
No related merge requests found
......@@ -35,10 +35,9 @@ project(jami-libclient)
# First, check if the compiler is new enough. Most versions of Clang
# are fine until specific problems arise. Checking for GCC is enough.
if(CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_GREATER_EQUAL 8.0)
message(STATUS "Found GCC version >= 8.0: " ${GCC_VERSION})
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
message(STATUS
"Found GCC version >= 8.0: " ${CMAKE_CXX_COMPILER_VERSION})
else()
message(FATAL_ERROR "Your version of GCC is too old, \
please install GCC 8.0 or newer")
......
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