summaryrefslogtreecommitdiff
path: root/volk
diff options
context:
space:
mode:
authorJohnathan Corgan2012-08-29 08:17:35 -0700
committerJohnathan Corgan2012-08-29 08:17:35 -0700
commit842c1cd3da19042a134cea722ce1d73f0a21e594 (patch)
tree5970b8d47796aac211542f39abab4a9a2c75644b /volk
parent66f49de1986dd531bee011299d4b1f7c62872d39 (diff)
parentef6648763589d389c0e95d62f524e46b32dd597c (diff)
downloadgnuradio-842c1cd3da19042a134cea722ce1d73f0a21e594.tar.gz
gnuradio-842c1cd3da19042a134cea722ce1d73f0a21e594.tar.bz2
gnuradio-842c1cd3da19042a134cea722ce1d73f0a21e594.zip
Merge branch 'master' into wip/gr-blocks-master
Diffstat (limited to 'volk')
-rw-r--r--volk/lib/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt
index 59d78b446..58bf026b4 100644
--- a/volk/lib/CMakeLists.txt
+++ b/volk/lib/CMakeLists.txt
@@ -55,6 +55,17 @@ if(NOT DEFINED COMPILER_NAME)
endif()
########################################################################
+# Special clang flag so flag checks can fail
+########################################################################
+if(COMPILER_NAME MATCHES "GNU")
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-Werror=unused-command-line-argument" HAVE_WERROR_UNUSED_CMD_LINE_ARG)
+ if(HAVE_WERROR_UNUSED_CMD_LINE_ARG)
+ set(VOLK_FLAG_CHECK_FLAGS "-Werror=unused-command-line-argument")
+ endif()
+endif()
+
+########################################################################
# detect x86 flavor of CPU
########################################################################
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(i.86|x86|x86_64|amd64)$")
@@ -82,7 +93,9 @@ macro(check_arch arch_name)
COMMAND ${PYTHON_EXECUTABLE} -c "import re; print(re.sub('\\W', '_', '${have_flag}'))"
OUTPUT_VARIABLE have_flag OUTPUT_STRIP_TRAILING_WHITESPACE
)
+ set(CMAKE_REQUIRED_FLAGS VOLK_FLAG_CHECK_FLAGS)
CHECK_CXX_COMPILER_FLAG(${flag} ${have_flag})
+ unset(CMAKE_REQUIRED_FLAGS)
if (NOT ${have_flag})
set(have_${arch_name} FALSE)
endif()