Skip to content

Commit

Permalink
COMP: Remove outdated exec_program to address CMP0153 warning
Browse files Browse the repository at this point in the history
The minimal GCC version currently supported is 7 so the removed code is
outdated.
  • Loading branch information
axel-grc authored and SimonRit committed Nov 7, 2024
1 parent ee9fa6a commit 003eac4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmake/FindGengetopt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ macro (WRAP_GGO GGO_SRCS)

set_source_files_properties(${${GGO_SRCS}} PROPERTIES GENERATED TRUE)
if(CMAKE_COMPILER_IS_GNUCXX)
find_program(DEFAULT_GCC gcc)
exec_program(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
if("${GCCVER}" VERSION_GREATER "4.5.2")
set_source_files_properties(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
endif()
set_source_files_properties(${${GGO_SRCS}} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
endif()
if(MSVC)
# Disable double to float truncation warning as gengetopt cannot append "f"
Expand Down

0 comments on commit 003eac4

Please sign in to comment.