diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index f1eac9adad0..fff70018025 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -40,11 +40,13 @@ if( CMAKE_MAJOR_VERSION LESS 3 ) set(PROJECT_VERSION_PATCH ${zstd_VERSION_PATCH}) set(PROJECT_VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}") enable_language(C) # Main library is in C + enable_language(ASM) # And ASM enable_language(CXX) # Testing contributed code also utilizes CXX else() project(zstd VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}" LANGUAGES C # Main library is in C + ASM # And ASM CXX # Testing contributed code also utilizes CXX ) endif() @@ -67,6 +69,7 @@ include(GNUInstallDirs) #----------------------------------------------------------------------------- include(AddZstdCompilationFlags) ADD_ZSTD_COMPILATION_FLAGS() +SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -x assembler-with-cpp") # Always hide XXHash symbols add_definitions(-DXXH_NAMESPACE=ZSTD_)