From f0dc01f7d2c9c1da3aa4970e593805fef1329453 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Tue, 21 Feb 2023 23:22:32 -0600 Subject: [PATCH] Fix aws-sdk-cpp and Python build issues --- external/aws-sdk-cpp.cmake | 20 +++++++++++++++++--- tools/setup-common.bat | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/external/aws-sdk-cpp.cmake b/external/aws-sdk-cpp.cmake index 3bbb73ac..8e2138c4 100644 --- a/external/aws-sdk-cpp.cmake +++ b/external/aws-sdk-cpp.cmake @@ -8,12 +8,26 @@ set(ENABLE_TESTING OFF) set(ENABLE_UNITY_BUILD ON) set(MINIMIZE_SIZE OFF) -if(NOT CMAKE_EXE_LINKER_FLAGS_DEBUGOPT) - set(CMAKE_EXE_LINKER_FLAGS_DEBUGOPT "") -endif() +# Some variables also need set in the cache... set them all! +set(BUILD_ONLY "s3" CACHE STRING "A semi-colon delimited list of the projects to build") +set(BUILD_SHARED_LIBS OFF CACHE BOOL "If enabled, all aws sdk libraries will be build as shared objects; otherwise all Aws libraries will be built as static objects") +set(CPP_STANDARD "17" CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.") +set(ENABLE_TESTING OFF CACHE BOOL "Flag to enable/disable building unit and integration tests") +set(ENABLE_UNITY_BUILD ON CACHE BOOL "If enabled, the SDK will be built using a single unified .cpp file for each service library. Reduces the size of static library binaries on Windows and Linux") +set(MINIMIZE_SIZE OFF CACHE BOOL "If enabled, the SDK will be built via a unity aggregation process that results in smaller static libraries; additionally, release binaries will favor size optimizations over speed") + +# Save off ${CMAKE_CXX_FLAGS} before modifying compiler settings +set(CMAKE_CXX_FLAGS_PREV "${CMAKE_CXX_FLAGS}") + +# Fix CMake errors for internal variables not set +include(aws-sdk-cpp/cmake/compiler_settings.cmake) +set_msvc_warnings() add_subdirectory(aws-sdk-cpp) +# Restore ${CMAKE_CXX_FLAGS} now that aws-sdk-cpp has been added +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_PREV}") + set_target_properties(uninstall PROPERTIES EXCLUDE_FROM_ALL True) set_target_properties(aws-c-auth PROPERTIES FOLDER aws-sdk-cpp) diff --git a/tools/setup-common.bat b/tools/setup-common.bat index 09ad52ff..fb15e9a7 100644 --- a/tools/setup-common.bat +++ b/tools/setup-common.bat @@ -2,6 +2,6 @@ pip install conan pip install geopandas pip install GitPython pip install sphinx -pip install sphinx_rtd_theme +pip install sphinx-rtd-theme pip install breathe conan profile new default --detect