From a5b3a06193fbf8415dd9d284644bee48c27cf8e5 Mon Sep 17 00:00:00 2001 From: Andreas Schenk <andreas_schenk@hms.harvard.edu> Date: Fri, 10 May 2013 17:01:24 -0400 Subject: [PATCH] fix master CMakeLists.txt to only add -Wno-attributes for newer compilers (not all older compilers have that option) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c3283fd6..78fd252a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -257,7 +257,9 @@ if (CMAKE_COMPILER_IS_GNUCXX) # with multiple -fno-strict-aliasing flags, triggering a complete rebuild whenever # cmake is run set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes") + if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes") + endif("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6") if(HIDDEN_VISIBILITY) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") set (_HIDDEN_VIS ON) -- GitLab