This commit is contained in:
Viktor Szakats 2025-08-09 00:46:21 +02:00
parent bde0d1aa11
commit 011faa1989
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -38,7 +38,7 @@ foreach(_target IN LISTS check_PROGRAMS _all) # keep '_all' last
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")
# CMake generates a static library for the OBJECT target. Which triggers warnings:
# 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,
# so it will not be used by any link operation that consumes this library