diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2020-11-25 17:50:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-25 17:50:21 (GMT) |
commit | 0b54c556a02f67a611638c47d5f92364da8eadd2 (patch) | |
tree | 2ba1eef16dd30a98b11ffa753fd8df28c3c469ca /config/cmake | |
parent | ffcb3542377c62cf972ff683c101e7268332f8a0 (diff) | |
download | hdf5-0b54c556a02f67a611638c47d5f92364da8eadd2.zip hdf5-0b54c556a02f67a611638c47d5f92364da8eadd2.tar.gz hdf5-0b54c556a02f67a611638c47d5f92364da8eadd2.tar.bz2 |
Add else choice to error flags option (#128)
Diffstat (limited to 'config/cmake')
-rw-r--r-- | config/cmake/HDFCXXCompilerFlags.cmake | 6 | ||||
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 8443bbd..5925989 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -91,6 +91,8 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general") + else () + ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general") endif () endif () elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -156,6 +158,8 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5") + else () + ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-5") endif () endif () @@ -183,6 +187,8 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") #if (HDF5_ENABLE_WARNINGS_AS_ERRORS) # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + #else () + # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8") #endif () if (HDF5_ENABLE_DEV_WARNINGS) # autotools always add the C flags with the CXX flags diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 456db36..5f35e61 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -110,6 +110,8 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general") + else () + ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-general") endif () endif () # gcc automatically inlines based on the optimization level @@ -119,6 +121,8 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general") + else () + ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/noerror-general") endif () elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform") @@ -175,6 +179,8 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/5") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") + else () + ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") endif () endif () |