Skip to content

Commit

Permalink
undo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Oct 18, 2024
1 parent 1c55339 commit cba509a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AWSCRTAndroidTestRunner/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.9)

# AWS lib
set(path_to_common "${CMAKE_CURRENT_LIST_DIR}/../../../../..")
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ project(aws-c-common LANGUAGES C VERSION 0.1.0)

message(STATUS "CMake ${CMAKE_VERSION}")

if (POLICY CMP0077)
cmake_policy(SET CMP0077 OLD) # Enable options to get their values from normal variables
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(AwsCFlags)
include(AwsCheckHeaders)
Expand Down
10 changes: 10 additions & 0 deletions cmake/AwsTestHarness.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ function(generate_test_driver driver_exe_name)
add_executable(${driver_exe_name} ${CMAKE_CURRENT_BINARY_DIR}/test_runner.c ${TESTS})
aws_set_common_properties(${driver_exe_name} NO_WEXTRA NO_PEDANTIC)

# Some versions of CMake (3.9-3.11) generate a test_runner.c file with
# a strncpy() call that triggers the "stringop-overflow" warning in GCC 8.1+
# This warning doesn't exist until GCC 7 though, so test for it before disabling.
if (NOT MSVC)
check_c_compiler_flag(-Wno-stringop-overflow HAS_WNO_STRINGOP_OVERFLOW)
if (HAS_WNO_STRINGOP_OVERFLOW)
SET_SOURCE_FILES_PROPERTIES(test_runner.c PROPERTIES COMPILE_FLAGS -Wno-stringop-overflow)
endif()
endif()

aws_add_sanitizers(${driver_exe_name} ${${PROJECT_NAME}_SANITIZERS})

target_link_libraries(${driver_exe_name} PRIVATE ${PROJECT_NAME})
Expand Down

0 comments on commit cba509a

Please sign in to comment.