[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:
committed by
Nick Terrell
parent
ea199876e2
commit
651a381060
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user