File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ else()
169169endif ()
170170
171171# Spdlog
172- if (KOMPUTE_OPT_USE_SPDLOG)
172+ if (NOT KOMPUTE_OPT_LOG_LEVEL_DISABLED AND KOMPUTE_OPT_USE_SPDLOG)
173173 add_compile_definitions (KOMPUTE_OPT_USE_SPDLOG=1)
174174
175175 if (KOMPUTE_OPT_USE_BUILT_IN_SPDLOG)
Original file line number Diff line number Diff line change @@ -74,6 +74,17 @@ else()
7474 kp_shader)
7575endif ()
7676
77+ # If OPT_LOG_LEVEL is disabled, kp_logger wont link against fmt::fmt, but we
78+ # still need it for non-logging utilities. Therefore, explicitly link fmt::fmt
79+ # to kompute target.
80+ if (KOMPUTE_OPT_LOG_LEVEL_DISABLED)
81+ if (KOMPUTE_OPT_USE_SPDLOG)
82+ message (FATAL_ERROR "KOMPUTE_OPT_LOG_LEVEL_DISABLED is incompatible with KOMPUTE_OPT_USE_SPDLOG. To continue set either one option to 'OFF'." )
83+ else ()
84+ target_link_libraries (kompute PUBLIC fmt::fmt)
85+ endif ()
86+ endif ()
87+
7788if (KOMPUTE_OPT_BUILD_PYTHON)
7889 include_directories (${PYTHON_INCLUDE_DIRS} )
7990
You can’t perform that action at this time.
0 commit comments