Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ if (HAS_UMASK)
add_definitions(-DHAS_UMASK)
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
add_definitions(-DLEGACY_GCC)
endif()

add_sdks()

# for user friendly cmake usage
Expand Down
4 changes: 4 additions & 0 deletions cmake/compiler_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ macro(set_gcc_warnings)
endif()
endif()
endif()
# when using gcc we need to ignore warnings for missing initalizers as it was identified as a bug in gcc
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
list(APPEND AWS_COMPILER_WARNINGS "-Wno-missing-field-initializers")
endif()
endmacro()

macro(set_msvc_flags)
Expand Down
4 changes: 0 additions & 4 deletions testing-resources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ if(PLATFORM_WINDOWS)
add_definitions("-DDISABLE_HOME_DIR_REDIRECT")
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
add_definitions("-DUSE_INTERNAL_TRIVIAL_COPY")
endif()

add_library(${PROJECT_NAME} ${TestingResources_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* use __has_trivial_copy instead of std for GCC < 5 compatability
*/
#ifdef USE_INTERNAL_TRIVIAL_COPY
#ifdef LEGACY_GCC
#define IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) __has_trivial_copy(T)
#else
#define IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) std::is_trivially_copy_constructible<T>::value
Expand Down