[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/09: cmake: add compiler flag only if the
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/09: cmake: add compiler flag only if the compiler supports it |
Date: |
Wed, 20 Aug 2014 20:18:47 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 8f02178318d90fceb476a46192fa98fda5bcb0ee
Author: Michael Dickens <address@hidden>
Date: Wed Aug 20 12:23:24 2014 -0400
cmake: add compiler flag only if the compiler supports it
---
cmake/Modules/UseSWIG.cmake | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/cmake/Modules/UseSWIG.cmake b/cmake/Modules/UseSWIG.cmake
index 008bfa0..837659f 100644
--- a/cmake/Modules/UseSWIG.cmake
+++ b/cmake/Modules/UseSWIG.cmake
@@ -146,9 +146,13 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
endif()
# Shut up some warnings from poor SWIG code generation that we
- # can do nothing about.
- set_source_files_properties( ${swig_generated_file_fullname}
- PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ # can do nothing about, when this flag is available
+ include(CheckCXXCompilerFlag)
+ check_cxx_compiler_flag("-Wno-unused-but-set-variable"
HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
+ if(HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
+ set_source_files_properties(${swig_generated_file_fullname}
+ PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
+ endif(HAVE_WNO_UNUSED_BUT_SET_VARIABLE)
#message("Full path to source file: ${swig_source_file_fullname}")
#message("Full path to the output file: ${swig_generated_file_fullname}")
- [Commit-gnuradio] [gnuradio] branch master updated (84ce73a -> d07c986), git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 04/09: grc: fix block height, git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 09/09: Merge remote-tracking branch 'michaelld/fix_typo', git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 08/09: Merge remote-tracking branch 'gnuradio-wg-grc/grc_snap_blocks_to_grid', git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 02/09: grc: one preferences handler for all bools, git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 03/09: grc: toggle action and mod1 modifier for snap-to-grid, git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 07/09: cmake: remove verbose messages from UseSWIG., git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 01/09: grc: snap-to-grid (WIP), git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 05/09: cmake: fix typo in FindUHD., git, 2014/08/20
- [Commit-gnuradio] [gnuradio] 06/09: cmake: add compiler flag only if the compiler supports it,
git <=