diff --git a/CMakeLists.txt b/CMakeLists.txt index bc106c6ee..7245600de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,9 +59,9 @@ option(TTG_ENABLE_TRACE "Whether to enable ttg::trace() output" OFF) option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." TRUE) if (FORCE_COLORED_OUTPUT) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - add_compile_options (-fdiagnostics-color=always) + add_compile_options ($<$:-fdiagnostics-color=always>) elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - add_compile_options (-fcolor-diagnostics) + add_compile_options ($<$:-fcolor-diagnostics>) endif () endif (FORCE_COLORED_OUTPUT) diff --git a/cmake/modules/FindCXXStdCoroutine.cmake b/cmake/modules/FindCXXStdCoroutine.cmake index 3a86d7a4d..dbe0b394f 100644 --- a/cmake/modules/FindCXXStdCoroutine.cmake +++ b/cmake/modules/FindCXXStdCoroutine.cmake @@ -164,7 +164,7 @@ foreach(component IN LISTS CXXStdCoroutines_want_components_ordered) add_library(std::coroutine INTERFACE IMPORTED GLOBAL) target_compile_features(std::coroutine INTERFACE cxx_std_20) if (option) - target_compile_options(std::coroutine INTERFACE "${option}") + target_compile_options(std::coroutine INTERFACE "$<$:${option}>") endif() set(CXX_COROUTINE_COMPONENT "${component}" CACHE STRING "The component of CXXStdCoroutine package found") # break out of this loop