Skip to content

Commit 66f4d85

Browse files
committed
Fix building on Solaris 10 x86_64 GCC 4.9.2
Prevent building x86_64 ASM from Solaris x86_64
1 parent ffde100 commit 66f4d85

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build/cmake/lib/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ if (MSVC)
4242
file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c)
4343
add_compile_options(-DZSTD_DISABLE_ASM)
4444
else ()
45-
file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c ${LIBRARY_DIR}/decompress/*.S)
45+
file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c)
46+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
47+
file(GLOB DecompressASMSources ${LIBRARY_DIR}/decompress/*.S)
48+
endif ()
4649
endif ()
4750
file(GLOB DictBuilderSources ${LIBRARY_DIR}/dictBuilder/*.c)
4851
file(GLOB DeprecatedSources ${LIBRARY_DIR}/deprecated/*.c)
@@ -60,7 +63,7 @@ if (ZSTD_BUILD_COMPRESSION)
6063
set(Headers ${Headers} ${CompressHeaders})
6164
endif()
6265
if (ZSTD_BUILD_DECOMPRESSION)
63-
set(Sources ${Sources} ${DecompressSources})
66+
set(Sources ${Sources} ${DecompressSources} ${DecompressASMSources})
6467
set(Headers ${Headers} ${DecompressHeaders})
6568
endif()
6669
if (ZSTD_BUILD_DICTBUILDER)

0 commit comments

Comments
 (0)