[build][cmake] Fix cmake with custom assembler

Tell CMake to explicitly compile our assembly as C code, because we
require it is compiled by a C compiler, and it is only enabled for
clang/gcc.

Fixes #3193.
This commit is contained in:
Nick Terrell authored and Nick Terrell committed 2022-12-20 13:02:21 -08:00
1 parent ea199876e2
commit 651a381060
2 files changed
+17 -9

No files matched your search

+6
View File
@@ -77,6 +77,12 @@ if (MSVC)
set(PlatformDependResources ${MSVC_RESOURCE_DIR}/libzstd-dll.rc)
endif ()
# Explicitly set the language to C for all files, including ASM files.
# Our assembly expects to be compiled by a C compiler, and is only enabled for
# __GNUC__ compatible compilers. Otherwise all the ASM code is disabled by
# macros.
set_source_files_properties(${Sources} PROPERTIES LANGUAGE C)
# Split project to static and shared libraries build
set(library_targets)
if (ZSTD_BUILD_SHARED)