-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
40 lines (35 loc) · 974 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.0)
project(libmemcpy LANGUAGES C ASM-ATT)
set(CMAKE_C_STANDARD 99)
add_compile_options(
"$<$<COMPILE_LANGUAGE:C>:-Wall>"
"$<$<COMPILE_LANGUAGE:C>:-Werror>"
)
if (WIN32)
set(LIBMEMCPY_PLATFORM_FILES src/mingw-shim.s)
else()
set(LIBMEMCPY_PLATFORM_FILES "")
endif()
add_library(memcpy STATIC
src/cpu.c
"${LIBMEMCPY_PLATFORM_FILES}"
# BEGIN GENERATED FILES
src/names-memcpy.c
impls/memmove-avx-unaligned-erms-rtm.s
impls/memmove-avx-unaligned-erms.s
impls/memmove-avx512-no-vzeroupper.s
impls/memmove-avx512-unaligned-erms.s
impls/memmove-erms.s
impls/memmove-evex-unaligned-erms.s
impls/memmove-sse2-unaligned-erms.s
impls/memmove-ssse3.s
# END GENERATED FILES
)
target_include_directories(memcpy
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE
src
)
add_subdirectory(examples EXCLUDE_FROM_ALL)