Skip to content

Commit

Permalink
only msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkh committed Sep 25, 2024
1 parent ccae671 commit b0ba165
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,26 @@ else()
list(APPEND AWSSDK_LIBRARIES "${aws_cpp_sdk_INSTALL}/lib/libs2n.a")
endif()

set(
cmake_args
"-DBUILD_SHARED_LIBS=OFF"
"-DBUILD_ONLY=transfer;s3"
"-DENABLE_TESTING=OFF"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_INSTALL_PREFIX=${aws_cpp_sdk_INSTALL}"
"-DCMAKE_INSTALL_LIBDIR=lib"
)

if(MSVC)
list(APPEND cmake_args "-DCMAKE_CXX_FLAGS=/W3 /WX")
endif()

include(ExternalProject)
ExternalProject_Add(
aws_sdk
SOURCE_DIR ${aws_cpp_sdk_SOURCE_DIR}
INSTALL_DIR ${aws_cpp_sdk_INSTALL}
CMAKE_ARGS "-DBUILD_SHARED_LIBS=OFF" "-DBUILD_ONLY=transfer;s3" "-DENABLE_TESTING=OFF" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=${aws_cpp_sdk_INSTALL}" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_CXX_FLAGS=\W3 \WX"
CMAKE_ARGS ${cmake_args}
BUILD_BYPRODUCTS ${AWSSDK_LIBRARIES}
)
endif()
Expand Down

0 comments on commit b0ba165

Please sign in to comment.