You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 2, 2025. It is now read-only.
I am trying to use the GSL (https://github.com/Microsoft/GSL) with cotire in a project. GSL adds compile definitions to the INTERFACE target using generator expressions:
When I run cotire 1.7.10 on my target after linking to this library I get the following error:
CMake Error at cotire/CMake/cotire.cmake:2254 (file):
Error evaluating generator expression:
$<CXX_COMPILER_ID:MSVC>
$<CXX_COMPILER_ID> may only be used with binary targets. It may not be
used with add_custom_command or add_custom_target.
Call Stack (most recent call first):
cotire/CMake/cotire.cmake:2848 (cotire_generate_target_script)
cotire/CMake/cotire.cmake:3254 (cotire_process_target_language)
cotire/CMake/cotire.cmake:3431 (cotire_target)
CMakeLists.txt:16 (cotire)
It seems that cotire does not like these generator expressions. A minimal reproduction is:
I tried running cotire before adding the target_compile_options which removes the error, but I get the impression that this means that the definition is being ignored by cotire which seems would cause other issues.
I do not know if this is an error with Cotire or with the way that I am using it.