File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,13 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDA
194
194
195
195
aws_prepare_symbol_visibility_args (${PROJECT_NAME} "AWS_CRT_CPP" )
196
196
197
- #set warnings
197
+ #set warnings and runtime library
198
198
if (MSVC )
199
+ if (STATIC_CRT )
200
+ target_compile_options (${PROJECT_NAME} PRIVATE "/MT$<$<CONFIG:Debug>:d>" )
201
+ else ()
202
+ target_compile_options (${PROJECT_NAME} PRIVATE "/MD$<$<CONFIG:Debug>:d>" )
203
+ endif ()
199
204
target_compile_options (${PROJECT_NAME} PRIVATE /W4 /WX /wd4068 )
200
205
else ()
201
206
target_compile_options (${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror )
Original file line number Diff line number Diff line change @@ -12,8 +12,13 @@ add_executable(${ELASTICURL_CPP_PROJECT_NAME} ${ELASTICURL_CPP_SRC})
12
12
set_target_properties (${ELASTICURL_CPP_PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX )
13
13
set_target_properties (${ELASTICURL_CPP_PROJECT_NAME} PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD} )
14
14
15
- #set warnings
15
+ #set warnings and runtime library
16
16
if (MSVC )
17
+ if (STATIC_CRT )
18
+ target_compile_options (${PROJECT_NAME} PRIVATE "/MT$<$<CONFIG:Debug>:d>" )
19
+ else ()
20
+ target_compile_options (${PROJECT_NAME} PRIVATE "/MD$<$<CONFIG:Debug>:d>" )
21
+ endif ()
17
22
target_compile_options (${ELASTICURL_CPP_PROJECT_NAME} PRIVATE /W4 /WX )
18
23
else ()
19
24
target_compile_options (${ELASTICURL_CPP_PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror )
You can’t perform that action at this time.
0 commit comments