Skip to content

Commit a9d28a0

Browse files
authored
Fix compiler warning for incomptible flags /O2 and /RTC1
1 parent e7bd60a commit a9d28a0

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,13 @@ option(ENABLE_ADDRESS_SANITIZER "Flags to enable/disable Address Sanitizer for g
7070
option(BYPASS_DEFAULT_PROXY "Bypass the machine's default proxy settings when using IXmlHttpRequest2" ON)
7171
option(BUILD_DEPS "Build third-party dependencies" ON)
7272

73-
7473
set(BUILD_ONLY "" CACHE STRING "A semi-colon delimited list of the projects to build")
7574
set(CPP_STANDARD "11" CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.")
7675

76+
if(NOT CMAKE_BUILD_TYPE)
77+
set(CMAKE_BUILD_TYPE Release)
78+
endif()
79+
7780
# backwards compatibility with old command line params
7881
if("${STATIC_LINKING}" STREQUAL "1")
7982
set(BUILD_SHARED_LIBS OFF)
@@ -106,6 +109,11 @@ endif()
106109

107110
include(initialize_project_version)
108111

112+
if (BUILD_SHARED_LIBS OR FORCE_SHARED_CRT)
113+
set(STATIC_CRT OFF)
114+
else()
115+
set(STATIC_CRT ON)
116+
endif()
109117

110118
# build third-party targets
111119
if (BUILD_DEPS)
@@ -163,6 +171,7 @@ if (BUILD_DEPS)
163171
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
164172
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
165173
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
174+
-DSTATIC_CRT=${STATIC_CRT}
166175
-DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR}
167176
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/bin
168177
${CMAKE_CURRENT_SOURCE_DIR}/third-party

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ You can use the following variations to create your build directory:
5252
* For Visual Studio:
5353
`msbuild ALL_BUILD.vcxproj`
5454

55-
##### To create a **release build**, do one of the following:
55+
##### The default build type is Release, to create a **Debug build**, do one of the following:
5656
* For Auto Make build systems:
5757
```
58-
cmake -DCMAKE_BUILD_TYPE=Release <path-to-root-of-this-source-code>
58+
cmake -DCMAKE_BUILD_TYPE=Debug <path-to-root-of-this-source-code>
5959
make
6060
sudo make install
6161
```

third-party/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,22 @@ project(AWSSDK_DEPS)
88

99
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
1010

11-
if(NOT CMAKE_BUILD_TYPE)
12-
set(CMAKE_BUILD_TYPE Release)
13-
endif()
14-
1511
include(ExternalProject)
1612

1713
set(AWS_DEPS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Dependencies install directory.")
1814
set(AWS_DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build" CACHE PATH "Dependencies build directory.")
1915
set(AWS_DEPS_DOWNLOAD_DIR "${AWS_DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependencies download directory.")
2016

2117
set(AWS_C_COMMON_URL "https://github.com/awslabs/aws-c-common.git")
22-
set(AWS_C_COMMON_TAG "f5383755e934745811d777a8e6c6866791b4302e")
18+
set(AWS_C_COMMON_TAG "ac02e17")
2319
include(BuildAwsCCommon)
2420

2521
set(AWS_CHECKSUMS_URL "https://github.com/awslabs/aws-checksums.git")
26-
set(AWS_CHECKSUMS_TAG "v0.1.2")
22+
set(AWS_CHECKSUMS_TAG "41dc36d")
2723
include(BuildAwsChecksums)
2824

2925
set(AWS_EVENT_STREAM_URL "https://github.com/awslabs/aws-c-event-stream.git")
30-
set(AWS_EVENT_STREAM_TAG "v0.1.1")
26+
set(AWS_EVENT_STREAM_TAG "97ab2e5")
3127
include(BuildAwsEventStream)
3228

3329
add_dependencies(AwsCEventStream AwsCCommon AwsChecksums)

third-party/cmake/BuildAwsCCommon.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ else()
4646
-DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR}
4747
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
4848
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
49+
-DSTATIC_CRT=${STATIC_CRT}
4950
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
5051
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
5152
)

third-party/cmake/BuildAwsChecksums.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ else()
4545
-DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR}
4646
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
4747
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
48+
-DSTATIC_CRT=${STATIC_CRT}
4849
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
4950
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
5051
)

third-party/cmake/BuildAwsEventStream.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ else()
5353
-DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR}
5454
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
5555
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
56+
-DSTATIC_CRT=${STATIC_CRT}
5657
-DCMAKE_INSTALL_RPATH=${DEPS_RPATH}
5758
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
5859
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}

0 commit comments

Comments
 (0)