Unverified Commit 1b14fa53 authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Merge pull request #1591 from Pospelove/cmake-cleanup

Cleanup options-related lines in CMakeLists.txt
parents 1a1ea028 cf55e5d4
...@@ -199,49 +199,25 @@ endif() ...@@ -199,49 +199,25 @@ endif()
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Misc definitions according to tweak options # Misc definitions according to tweak options
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
if(SPDLOG_WCHAR_SUPPORT) set(SPDLOG_WCHAR_TO_UTF8_SUPPORT ${SPDLOG_WCHAR_SUPPORT})
target_compile_definitions(spdlog PUBLIC SPDLOG_WCHAR_TO_UTF8_SUPPORT) foreach(SPDLOG_OPTION
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_WCHAR_TO_UTF8_SUPPORT) SPDLOG_WCHAR_TO_UTF8_SUPPORT
endif() SPDLOG_WCHAR_FILENAMES
SPDLOG_NO_EXCEPTIONS
if(SPDLOG_WCHAR_FILENAMES) SPDLOG_CLOCK_COARSE
target_compile_definitions(spdlog PUBLIC SPDLOG_WCHAR_FILENAMES) SPDLOG_PREVENT_CHILD_FD
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_WCHAR_FILENAMES) SPDLOG_NO_THREAD_ID
endif() SPDLOG_NO_TLS
SPDLOG_NO_ATOMIC_LEVELS
if(SPDLOG_NO_EXCEPTIONS) )
target_compile_definitions(spdlog PUBLIC SPDLOG_NO_EXCEPTIONS) if(${SPDLOG_OPTION})
target_compile_definitions(spdlog PUBLIC ${SPDLOG_OPTION})
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_EXCEPTIONS) target_compile_definitions(spdlog_header_only INTERFACE ${SPDLOG_OPTION})
if(NOT MSVC)
target_compile_options(spdlog PRIVATE -fno-exceptions)
endif() endif()
endif() endforeach()
if(SPDLOG_CLOCK_COARSE)
target_compile_definitions(spdlog PRIVATE SPDLOG_CLOCK_COARSE)
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_CLOCK_COARSE)
endif()
if(SPDLOG_PREVENT_CHILD_FD)
target_compile_definitions(spdlog PRIVATE SPDLOG_PREVENT_CHILD_FD)
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_PREVENT_CHILD_FD)
endif()
if(SPDLOG_NO_THREAD_ID)
target_compile_definitions(spdlog PRIVATE SPDLOG_NO_THREAD_ID)
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_THREAD_ID)
endif()
if(SPDLOG_NO_TLS)
target_compile_definitions(spdlog PRIVATE SPDLOG_NO_TLS)
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_TLS)
endif()
if(SPDLOG_NO_ATOMIC_LEVELS) if(SPDLOG_NO_EXCEPTIONS AND NOT MSVC)
target_compile_definitions(spdlog PUBLIC SPDLOG_NO_ATOMIC_LEVELS) target_compile_options(spdlog PRIVATE -fno-exceptions)
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_ATOMIC_LEVELS)
endif() endif()
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment