mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-19 02:16:55 +08:00
Resolve all C++ -O2 warnings
This commit is contained in:
parent
a083479fcc
commit
d7fd06f795
@ -132,7 +132,7 @@ namespace etl
|
||||
#endif
|
||||
|
||||
// We can't have std::swap and etl::swap templates coexisting in the unit tests
|
||||
// as the compiler will be unable to decide of which one to use, due to ADL.
|
||||
// as the compiler will be unable to decide which one to use, due to ADL.
|
||||
#if ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)
|
||||
//***************************************************************************
|
||||
// swap
|
||||
|
||||
@ -342,17 +342,27 @@ if (ETL_OPTIMISATION MATCHES "-O3")
|
||||
endif()
|
||||
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "MSVC"))
|
||||
message(STATUS "Using MSVC compiler")
|
||||
target_compile_options(etl_tests
|
||||
PRIVATE
|
||||
/Zc:__cplusplus
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
message(STATUS "Using GCC compiler")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
message(STATUS "Using Clang compiler")
|
||||
endif ()
|
||||
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||
target_compile_options(etl_tests
|
||||
PRIVATE
|
||||
-fno-omit-frame-pointer
|
||||
-fno-common
|
||||
-Werror=maybe-uninitialized
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user