1 add_library(pm3rrg_rdv4_hardnested_nosimd OBJECT
2 hardnested/hardnested_bf_core.c
3 hardnested/hardnested_bitarray_core.c)
5 target_compile_options(pm3rrg_rdv4_hardnested_nosimd PRIVATE -Wall -O3)
6 set_property(TARGET pm3rrg_rdv4_hardnested_nosimd PROPERTY POSITION_INDEPENDENT_CODE ON)
8 target_include_directories(pm3rrg_rdv4_hardnested_nosimd PRIVATE
13 target_compile_definitions(pm3rrg_rdv4_hardnested_nosimd PRIVATE NOSIMD_BUILD)
16 ## These are mostly for x86-based architectures, which is not useful for many Android devices.
17 ## Mingw platforms: AMD64
18 set(X86_CPUS x86 x86_64 i686 AMD64)
19 set(ARM64_CPUS arm64 aarch64)
20 set(ARM32_CPUS armel armhf armv7-a)
22 message(STATUS "CMAKE_SYSTEM_PROCESSOR := ${CMAKE_SYSTEM_PROCESSOR}")
24 if ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST X86_CPUS)
25 message(STATUS "Building optimised x86/x86_64 binaries")
27 target_compile_options(pm3rrg_rdv4_hardnested_nosimd BEFORE PRIVATE
28 -mno-mmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f)
31 add_library(pm3rrg_rdv4_hardnested_mmx OBJECT
32 hardnested/hardnested_bf_core.c
33 hardnested/hardnested_bitarray_core.c)
35 target_compile_options(pm3rrg_rdv4_hardnested_mmx PRIVATE -Wall -O3)
36 target_compile_options(pm3rrg_rdv4_hardnested_mmx BEFORE PRIVATE
37 -mmmx -mno-sse2 -mno-avx -mno-avx2 -mno-avx512f)
38 set_property(TARGET pm3rrg_rdv4_hardnested_mmx PROPERTY POSITION_INDEPENDENT_CODE ON)
40 target_include_directories(pm3rrg_rdv4_hardnested_mmx PRIVATE
46 add_library(pm3rrg_rdv4_hardnested_sse2 OBJECT
47 hardnested/hardnested_bf_core.c
48 hardnested/hardnested_bitarray_core.c)
50 target_compile_options(pm3rrg_rdv4_hardnested_sse2 PRIVATE -Wall -O3)
51 target_compile_options(pm3rrg_rdv4_hardnested_sse2 BEFORE PRIVATE
52 -mmmx -msse2 -mno-avx -mno-avx2 -mno-avx512f)
53 set_property(TARGET pm3rrg_rdv4_hardnested_sse2 PROPERTY POSITION_INDEPENDENT_CODE ON)
55 target_include_directories(pm3rrg_rdv4_hardnested_sse2 PRIVATE
61 add_library(pm3rrg_rdv4_hardnested_avx OBJECT
62 hardnested/hardnested_bf_core.c
63 hardnested/hardnested_bitarray_core.c)
65 target_compile_options(pm3rrg_rdv4_hardnested_avx PRIVATE -Wall -O3)
66 target_compile_options(pm3rrg_rdv4_hardnested_avx BEFORE PRIVATE
67 -mmmx -msse2 -mavx -mno-avx2 -mno-avx512f)
68 set_property(TARGET pm3rrg_rdv4_hardnested_avx PROPERTY POSITION_INDEPENDENT_CODE ON)
70 target_include_directories(pm3rrg_rdv4_hardnested_avx PRIVATE
76 add_library(pm3rrg_rdv4_hardnested_avx2 OBJECT
77 hardnested/hardnested_bf_core.c
78 hardnested/hardnested_bitarray_core.c)
80 target_compile_options(pm3rrg_rdv4_hardnested_avx2 PRIVATE -Wall -O3)
81 target_compile_options(pm3rrg_rdv4_hardnested_avx2 BEFORE PRIVATE
82 -mmmx -msse2 -mavx -mavx2 -mno-avx512f)
83 set_property(TARGET pm3rrg_rdv4_hardnested_avx2 PROPERTY POSITION_INDEPENDENT_CODE ON)
85 target_include_directories(pm3rrg_rdv4_hardnested_avx2 PRIVATE
91 add_library(pm3rrg_rdv4_hardnested_avx512 OBJECT
92 hardnested/hardnested_bf_core.c
93 hardnested/hardnested_bitarray_core.c)
95 target_compile_options(pm3rrg_rdv4_hardnested_avx512 PRIVATE -Wall -O3)
96 target_compile_options(pm3rrg_rdv4_hardnested_avx512 BEFORE PRIVATE
97 -mmmx -msse2 -mavx -mavx2 -mavx512f)
98 set_property(TARGET pm3rrg_rdv4_hardnested_avx512 PROPERTY POSITION_INDEPENDENT_CODE ON)
100 target_include_directories(pm3rrg_rdv4_hardnested_avx512 PRIVATE
106 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_mmx>
107 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_sse2>
108 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_avx>
109 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_avx2>
110 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_avx512>)
111 elseif ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST ARM64_CPUS)
112 message(STATUS "Building optimised arm64 binaries")
115 add_library(pm3rrg_rdv4_hardnested_neon OBJECT
116 hardnested/hardnested_bf_core.c
117 hardnested/hardnested_bitarray_core.c)
119 target_compile_options(pm3rrg_rdv4_hardnested_neon PRIVATE -Wall -O3)
120 set_property(TARGET pm3rrg_rdv4_hardnested_neon PROPERTY POSITION_INDEPENDENT_CODE ON)
122 target_include_directories(pm3rrg_rdv4_hardnested_neon PRIVATE
128 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_neon>)
129 elseif ("${CMAKE_SYSTEM_PROCESSOR}" IN_LIST ARM32_CPUS)
130 message(STATUS "Building optimised arm binaries")
133 add_library(pm3rrg_rdv4_hardnested_neon OBJECT
134 hardnested/hardnested_bf_core.c
135 hardnested/hardnested_bitarray_core.c)
137 target_compile_options(pm3rrg_rdv4_hardnested_neon PRIVATE -Wall -O3)
138 target_compile_options(pm3rrg_rdv4_hardnested_neon BEFORE PRIVATE
140 set_property(TARGET pm3rrg_rdv4_hardnested_neon PROPERTY POSITION_INDEPENDENT_CODE ON)
142 target_include_directories(pm3rrg_rdv4_hardnested_neon PRIVATE
148 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_neon>)
150 message(STATUS "Not building optimised targets")
154 add_library(pm3rrg_rdv4_hardnested STATIC
155 hardnested/hardnested_bruteforce.c
156 $<TARGET_OBJECTS:pm3rrg_rdv4_hardnested_nosimd>
158 target_compile_options(pm3rrg_rdv4_hardnested PRIVATE -Wall -O3)
159 set_property(TARGET pm3rrg_rdv4_hardnested PROPERTY POSITION_INDEPENDENT_CODE ON)
160 target_include_directories(pm3rrg_rdv4_hardnested PRIVATE
166 target_include_directories(pm3rrg_rdv4_hardnested INTERFACE hardnested)