11_ydb_sdk_add_library(yt-assert)
2- target_compile_options (yt-assert PRIVATE
3- -Wdeprecated-this-capture
4- )
2+
3+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
4+ target_compile_options (yt-assert PRIVATE
5+ -Wdeprecated-this-capture
6+ )
7+ endif ()
8+
59target_link_libraries (yt-assert PUBLIC
610 yutil
711)
@@ -30,9 +34,12 @@ _ydb_sdk_install_targets(TARGETS yt-containers)
3034
3135
3236_ydb_sdk_add_library(yt-exception)
33- target_compile_options (yt-exception PRIVATE
34- -Wdeprecated-this-capture
35- )
37+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
38+ target_compile_options (yt-exception PRIVATE
39+ -Wdeprecated-this-capture
40+ )
41+ endif ()
42+
3643target_link_libraries (yt-exception PUBLIC
3744 yutil
3845)
@@ -49,7 +56,7 @@ target_link_libraries(yt-malloc PUBLIC
4956target_sources (yt-malloc PRIVATE
5057 malloc/malloc.cpp
5158)
52- if (NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" ))
59+ if (NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" ) AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
5360 target_compile_options (yt-malloc PRIVATE
5461 -Wdeprecated-this-capture
5562 )
@@ -79,7 +86,7 @@ target_sources(yt-memory
7986 memory/safe_memory_reader.cpp
8087 memory/shared_range.cpp
8188)
82- if (NOT WIN32 )
89+ if (NOT WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
8390 target_compile_options (yt-memory PRIVATE
8491 -Wdeprecated-this-capture
8592 )
@@ -88,9 +95,11 @@ _ydb_sdk_install_targets(TARGETS yt-memory)
8895
8996
9097_ydb_sdk_add_library(yt-misc)
91- target_compile_options (yt-misc PRIVATE
92- -Wdeprecated-this-capture
93- )
98+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
99+ target_compile_options (yt-misc PRIVATE
100+ -Wdeprecated-this-capture
101+ )
102+ endif ()
94103target_link_libraries (yt-misc
95104 PUBLIC
96105 yutil
@@ -118,9 +127,11 @@ _ydb_sdk_install_targets(TARGETS yt-small_containers)
118127
119128
120129_ydb_sdk_add_library(yt-string )
121- target_compile_options (yt-string PRIVATE
122- -Wdeprecated-this-capture
123- )
130+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
131+ target_compile_options (yt-string PRIVATE
132+ -Wdeprecated-this-capture
133+ )
134+ endif ()
124135target_link_libraries (yt-string
125136 PUBLIC
126137 yutil
@@ -141,9 +152,11 @@ _ydb_sdk_install_targets(TARGETS yt-string)
141152
142153
143154_ydb_sdk_add_library(yt-yson)
144- target_compile_options (yt-yson PRIVATE
145- -Wdeprecated-this-capture
146- )
155+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
156+ target_compile_options (yt-yson PRIVATE
157+ -Wdeprecated-this-capture
158+ )
159+ endif ()
147160target_link_libraries (yt-yson
148161 PUBLIC
149162 yutil
@@ -171,7 +184,7 @@ target_sources(yt-yson_string PRIVATE
171184 yson_string/convert.cpp
172185 yson_string/string .cpp
173186)
174- if (NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" ))
187+ if (NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" ) AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
175188 target_compile_options (yt-yson_string PRIVATE
176189 -Wdeprecated-this-capture
177190 )
0 commit comments