summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/Modules/FindUHD.cmake2
-rw-r--r--cmake/Modules/UseSWIG.cmake27
2 files changed, 8 insertions, 21 deletions
diff --git a/cmake/Modules/FindUHD.cmake b/cmake/Modules/FindUHD.cmake
index 94db092e8e..9f69699a75 100644
--- a/cmake/Modules/FindUHD.cmake
+++ b/cmake/Modules/FindUHD.cmake
@@ -37,7 +37,7 @@ if(LOCAL_FINDUHD_DIR)
# prepend the found directory to the MODULE path
list(INSERT CMAKE_MODULE_PATH 0 ${LOCAL_FINDUHD_DIR})
- # "QUITE" works on CMake 2.8+ only
+ # "QUIET" works on CMake 2.8+ only
unset(LOCAL_UHD_QUIET)
if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.0")
set(LOCAL_UHD_QUIET "QUIET")
diff --git a/cmake/Modules/UseSWIG.cmake b/cmake/Modules/UseSWIG.cmake
index 008bfa0ed5..c0f172870b 100644
--- a/cmake/Modules/UseSWIG.cmake
+++ b/cmake/Modules/UseSWIG.cmake
@@ -146,12 +146,14 @@ 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}")
get_directory_property(cmake_include_directories INCLUDE_DIRECTORIES)
set(swig_include_dirs)
foreach(it ${cmake_include_directories})
@@ -220,7 +222,6 @@ print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))"
set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files})
foreach(swig_gen_file ${${outfiles}})
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: name adding dep from '${_target}' to '${swig_gen_file}'")
add_custom_command(
OUTPUT ${swig_gen_file}
COMMAND ""
@@ -233,15 +234,6 @@ print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))"
${outfiles} PROPERTIES GENERATED 1
)
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: name is '${name}'")
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: ${name} swig_generated_file_fullname is '${swig_generated_file_fullname}'")
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: ${name} swig_extra_generated_files is '${swig_extra_generated_files}'")
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: ${name} outfiles is '${outfiles}'")
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: ${name} {outfiles} is '${${outfiles}}'")
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: SWIG_MODULE_${name}_EXTRA_DEPS is '${SWIG_MODULE_${name}_EXTRA_DEPS}'")
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: SWIG_MODULE_${name}_EXTRA_FLAGS is '${SWIG_MODULE_${name}_EXTRA_FLAGS}'")
- #message(STATUS "UseSWIG::SWIG_ADD_SOURCE_TO_MODULE: SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG is '${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}'")
-
endmacro()
#
@@ -298,11 +290,6 @@ macro(SWIG_ADD_MODULE name language)
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
endif()
endif ()
-
- #message(STATUS "UseSWIG::SWIG_ADD_MODULE: name is '${name}'")
- #message(STATUS "UseSWIG::SWIG_ADD_MODULE: ${name} swig_generated_sources is '${swig_generated_sources}'")
- #message(STATUS "UseSWIG::SWIG_ADD_MODULE: ${name} swig_other_sources is '${swig_other_sources}'")
-
endmacro()
#