1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

cmake: bump minimum required GCC version up to 8

Change-Id: I67e37155cdca75b83943497c008aaf18edb9a95f
This commit is contained in:
Amin Bandali 2022-06-10 10:10:31 -04:00 committed by Adrien Béraud
parent 51296aad85
commit d7045b5d54

View file

@ -37,11 +37,11 @@ project(jami-libclient)
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION) OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_GREATER_EQUAL 4.8) if(GCC_VERSION VERSION_GREATER_EQUAL 8.0)
message(STATUS "Found GCC version >= 4.8: " ${GCC_VERSION}) message(STATUS "Found GCC version >= 8.0: " ${GCC_VERSION})
else() else()
message(FATAL_ERROR "Your version of GCC is too old, \ message(FATAL_ERROR "Your version of GCC is too old, \
please install GCC 4.8 or later") please install GCC 8.0 or newer")
endif() endif()
endif() endif()
@ -108,32 +108,25 @@ endif()
# grep -E "\-W[a-zA-Z=-]*" -o > /tmp/49; # grep -E "\-W[a-zA-Z=-]*" -o > /tmp/49;
# sort /tmp/48 /tmp/49 | uniq -u # sort /tmp/48 /tmp/49 | uniq -u
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
if(GCC_VERSION VERSION_GREATER_EQUAL 4.9) add_definitions(
add_definitions( # GCC 4.9
-Wconditionally-supported -Wconditionally-supported
-Wno-cpp -Wno-cpp
-Wdouble-promotion -Wdouble-promotion
-Wdate-time -Wdate-time
-Wfloat-conversion) -Wfloat-conversion
endif() # GCC 5.1
-Wformat-signedness
if(GCC_VERSION VERSION_GREATER_EQUAL 5.1) -Wnormalized
add_definitions( -Wshift-count-negative
-Wformat-signedness -Wshift-count-overflow
-Wnormalized -Wsized-deallocation
-Wshift-count-negative -Wsizeof-array-argument
-Wshift-count-overflow # GCC 6.0
-Wsized-deallocation -Wnull-dereference
-Wsizeof-array-argument) -Wshift-negative-value
endif() -Wshift-overflow
-Wduplicated-cond)
if(GCC_VERSION VERSION_GREATER_EQUAL 6.0)
add_definitions(
-Wnull-dereference
-Wshift-negative-value
-Wshift-overflow
-Wduplicated-cond)
endif()
endif() endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")