mirror of
https://github.com/curl/curl.git
synced 2026-07-01 06:39:08 +03:00
cmake: clang detection tidy-ups
Follow-up to0513f9f878#18645 Follow-up tofe5225b5ea#18209 Closes #18659
This commit is contained in:
parent
c23d7e7a98
commit
06d00e3879
2 changed files with 7 additions and 9 deletions
|
|
@ -37,7 +37,7 @@ foreach(_target IN LISTS check_PROGRAMS _all) # keep '_all' last
|
|||
set(_examples_c "${check_PROGRAMS}")
|
||||
list(TRANSFORM _examples_c APPEND ".c")
|
||||
add_library(${_target_name} OBJECT EXCLUDE_FROM_ALL ${_examples_c})
|
||||
if(MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") # MSVC but exclude clang-cl
|
||||
# CMake generates a static library for the OBJECT target. Silence these 'lib.exe' warnings:
|
||||
# warning LNK4006: main already defined in ....obj; second definition ignored
|
||||
# warning LNK4221: This object file does not define any previously undefined public symbols,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue