diff --git a/Vates/ParaviewPlugins/CMakeLists.txt b/Vates/ParaviewPlugins/CMakeLists.txt index 51d5be27eb7f3aa09a3374d9624607c5ef7436e4..7ddcbe9c57b204d04c61d7912c145050df3505bb 100644 --- a/Vates/ParaviewPlugins/CMakeLists.txt +++ b/Vates/ParaviewPlugins/CMakeLists.txt @@ -1,6 +1,9 @@ # bring in Mantid/VATES API dependencies set_mantid_subprojects( Vates/VatesAPI ) +# vtktypemacro doesn't play nicely with -Wpedantic +string(REPLACE "-Wpedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + # NonOrthogonalSourcePlugin is necessary for viewing materials with nonorthogonal basis vectors. # Copy it over to the pvplugins dir if("${CMAKE_CFG_INTDIR}" STREQUAL ".") diff --git a/buildconfig/CMake/GNUSetup.cmake b/buildconfig/CMake/GNUSetup.cmake index b25b8c6c6f43f719ff49de6ab06168bbf74fa87b..ed9e6e3be7eae8a54bdfbbe7d79c6523f3caf0f6 100644 --- a/buildconfig/CMake/GNUSetup.cmake +++ b/buildconfig/CMake/GNUSetup.cmake @@ -37,16 +37,10 @@ set( GNUFLAGS "-Wall -Wextra -Wconversion -Winit-self -Wpointer-arith -Wcast-qua # -Wno-deprecated: Do not warn about use of deprecated headers. # -Wno-write-strings: Do not warn about deprecated conversions of char*->const char* # -Wno-unused-result: Do not warn about unused return values in some C functions -set( GNUFLAGS "${GNUFLAGS} -Wno-deprecated -Wno-write-strings") +set( GNUFLAGS "${GNUFLAGS} -Wno-deprecated -Wno-write-strings -Wno-unused-result -Wpedantic") -# Check if we have a new enough version for this flag -# some -pedantic warnings remain with gcc 4.4.7 -if ( CMAKE_COMPILER_IS_GNUCXX ) - if (NOT (GCC_COMPILER_VERSION VERSION_LESS "4.5")) - set(GNUFLAGS "${GNUFLAGS} -Wno-unused-result -pedantic") - endif () -elseif ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) - set(GNUFLAGS "${GNUFLAGS} -Wno-sign-conversion") +if ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) + set(GNUFLAGS "${GNUFLAGS} -Wno-sign-conversion") endif() # Check if we have a new enough version for these flags