Skip to content

Commit 12d07df

Browse files
bastarnfinn
authored andcommitted
skip three unsupported compiler flags if g++ is below 5.1; fixes #76
1 parent 2ddebb1 commit 12d07df

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
It is possible to specify a classical charge distribution of point multipoles.
1212
This can be an additional source of electrostatic potential for the calculation
1313
of the ASC.
14+
- Restored compilation for g++ < v5.1.
1415

1516
## [Version 1.1.10] - 2017-03-27
1617

cmake/custom/compilers/GNU.CXX.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ if(NOT DEFINED ENV{CXXFLAGS})
1414
endif()
1515

1616
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD_FLAG}")
17-
set(EXDIAG_CXX_FLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override -Wuseless-cast -Wunsafe-loop-optimizations)
17+
set(EXDIAG_CXX_FLAGS -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wuseless-cast -Wunsafe-loop-optimizations)
18+
if(NOT CXX_COMPILER_VERSION VERSION_LESS 5.1.0)
19+
set(EXDIAG_CXX_FLAGS ${EXDIAG_CXX_FLAGS} -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override)
20+
endif()
1821
if(CXX_COMPILER_VERSION VERSION_LESS 4.9.0 OR NOT ENABLE_CXX11_SUPPORT)
1922
message(STATUS "Turning off extended diagnostic flags.")
2023
set(EXDIAG_CXX_FLAGS)

0 commit comments

Comments
 (0)