Skip to content

Commit

Permalink
Disable -Wunused-macros warning when scanning for includes
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed Nov 26, 2017
1 parent 322cbb2 commit d71c586
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMake/cotire.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1538,18 +1538,19 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
# GCC options used
# -H print the name of each header file used
# -E invoke preprocessor
# -Wno-unused-macros warning incompatible with -fdirectives-only
# -fdirectives-only do not expand macros, requires GCC >= 4.3
if (_flags)
# append to list
list (APPEND _flags -H -E)
if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0")
list (APPEND _flags "-fdirectives-only")
list (APPEND _flags "-Wno-unused-macros" "-fdirectives-only")
endif()
else()
# return as a flag string
set (_flags "-H -E")
if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0")
set (_flags "${_flags} -fdirectives-only")
set (_flags "${_flags} -Wno-unused-macros -fdirectives-only")
endif()
endif()
elseif (_compilerID MATCHES "Clang")
Expand Down

0 comments on commit d71c586

Please sign in to comment.