target_sources(third_party_lib PRIVATE win32/mktemp.c)
endif ()
+if(MSVC)
+ target_compile_options(third_party_lib PRIVATE /FI ${CMAKE_BINARY_DIR}/config.h)
+else()
+ target_compile_options(third_party_lib PRIVATE -include ${CMAKE_BINARY_DIR}/config.h)
+endif()
+
if(ENABLE_TRACING)
target_sources(third_party_lib PRIVATE minitrace.c)
- set_source_files_properties(minitrace.c PROPERTIES COMPILE_DEFINITIONS "MTR_ENABLED;_POSIX_C_SOURCE=200809L")
endif()
set(xxhdispatchtest [=[
target_link_libraries(third_party_lib PRIVATE standard_settings)
target_link_libraries(third_party_lib INTERFACE blake3)
-# These warnings are enabled by default even without e.g. -Wall, but we don't
-# want them in third_party.
-if(CMAKE_CXX_COMPILER_ID MATCHES "^GNU|Clang$")
- target_compile_options(
- third_party_lib
- PRIVATE
- $<$<COMPILE_LANGUAGE:C>:-Wno-implicit-function-declaration
- -Wno-int-conversion>)
-endif()
-
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
- target_compile_options(
- third_party_lib
- PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-attributes>)
-endif()
-
# Silence warning from winbase.h due to /Zc:preprocessor.
if(MSVC)
target_compile_options(
PRIVATE /wd5105)
endif()
-# The headers are included from the rest of the project, so turn off warnings as
-# required.
-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- target_compile_options(third_party_lib INTERFACE -Wno-shadow)
-endif()
-
add_subdirectory(blake3)