mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
moved BUILD_TESTS check outside of root cmake check to allow building tests in submodules (#777)
added check for GNUC >= 11 for -Wstringop-overread ignore pragma since it isn't introduced until gcc/g++-11 Co-authored-by: Josh <joshua.martens@magna.com>
This commit is contained in:
parent
85f2e09ef7
commit
13759c1cbb
@ -73,9 +73,10 @@ if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake)
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/etl DESTINATION include)
|
||||
|
||||
if (BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if (BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
@ -33,11 +33,11 @@ SOFTWARE.
|
||||
* This file is intended to evaluated multiple times by design.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__)
|
||||
#pragma GCC diagnostic push
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 11) && !defined(__clang__) && !defined(__llvm__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overread"
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || defined(__llvm__)
|
||||
#pragma clang diagnostic push
|
||||
#endif
|
||||
#pragma clang diagnostic push
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user