Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 2 | |
| 3 | INCLUDE(GNUInstallDirs) |
| 4 | |
| 5 | # ---[ Project and semantic versioning. |
Marat Dukhan | 63d41a5 | 2017-10-26 00:37:12 +0000 | [diff] [blame] | 6 | PROJECT(cpuinfo C CXX) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 7 | |
| 8 | # ---[ Options. |
Marat Dukhan | daafc28 | 2018-01-31 23:55:05 -0800 | [diff] [blame] | 9 | SET(CPUINFO_LIBRARY_TYPE "default" CACHE STRING "Type of cpuinfo library (shared, static, or default) to build") |
| 10 | SET_PROPERTY(CACHE CPUINFO_LIBRARY_TYPE PROPERTY STRINGS default static shared) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 11 | SET(CPUINFO_RUNTIME_TYPE "default" CACHE STRING "Type of runtime library (shared, static, or default) to use") |
| 12 | SET_PROPERTY(CACHE CPUINFO_RUNTIME_TYPE PROPERTY STRINGS default static shared) |
Marat Dukhan | cf70aee | 2018-03-24 23:21:02 -0700 | [diff] [blame] | 13 | IF(ANDROID) |
| 14 | OPTION(CPUINFO_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" OFF) |
| 15 | ELSE() |
| 16 | OPTION(CPUINFO_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" ON) |
| 17 | ENDIF() |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 18 | OPTION(CPUINFO_BUILD_TOOLS "Build command-line tools" ON) |
Marat Dukhan | cc44bf3 | 2017-12-18 17:45:48 -0800 | [diff] [blame] | 19 | OPTION(CPUINFO_BUILD_UNIT_TESTS "Build cpuinfo unit tests" ON) |
| 20 | OPTION(CPUINFO_BUILD_MOCK_TESTS "Build cpuinfo mock tests" ON) |
| 21 | OPTION(CPUINFO_BUILD_BENCHMARKS "Build cpuinfo micro-benchmarks" ON) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 22 | |
| 23 | # ---[ CMake options |
| 24 | IF(CPUINFO_BUILD_UNIT_TESTS OR CPUINFO_BUILD_MOCK_TESTS) |
| 25 | ENABLE_TESTING() |
| 26 | ENDIF() |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 27 | |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 28 | MACRO(CPUINFO_TARGET_ENABLE_C99 target) |
| 29 | IF(${CMAKE_VERSION} VERSION_LESS "3.1") |
| 30 | IF(NOT MSVC) |
| 31 | TARGET_COMPILE_OPTIONS(${target} PRIVATE -std=c99) |
| 32 | ENDIF() |
| 33 | ELSE() |
| 34 | SET_TARGET_PROPERTIES(${target} PROPERTIES |
| 35 | C_STANDARD 99 |
| 36 | C_EXTENSIONS NO) |
| 37 | ENDIF() |
| 38 | ENDMACRO() |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 39 | |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 40 | MACRO(CPUINFO_TARGET_ENABLE_CXX11 target) |
| 41 | IF(${CMAKE_VERSION} VERSION_LESS "3.1") |
| 42 | IF(NOT MSVC) |
| 43 | TARGET_COMPILE_OPTIONS(${target} PRIVATE -std=c++11) |
| 44 | ENDIF() |
| 45 | ELSE() |
| 46 | SET_TARGET_PROPERTIES(${target} PROPERTIES |
| 47 | CXX_STANDARD 11 |
| 48 | CXX_EXTENSIONS NO) |
| 49 | ENDIF() |
| 50 | ENDMACRO() |
| 51 | |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 52 | MACRO(CPUINFO_TARGET_RUNTIME_LIBRARY target) |
| 53 | IF(MSVC AND NOT CPUINFO_RUNTIME_TYPE STREQUAL "default") |
| 54 | IF(CPUINFO_RUNTIME_TYPE STREQUAL "shared") |
| 55 | TARGET_COMPILE_OPTIONS(${target} PRIVATE |
| 56 | "/MD$<$<CONFIG:Debug>:d>") |
| 57 | ELSEIF(CPUINFO_RUNTIME_TYPE STREQUAL "static") |
| 58 | TARGET_COMPILE_OPTIONS(${target} PRIVATE |
| 59 | "/MT$<$<CONFIG:Debug>:d>") |
| 60 | ENDIF() |
| 61 | ENDIF() |
| 62 | ENDMACRO() |
| 63 | |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 64 | # ---[ Build flags |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 65 | SET(CPUINFO_SUPPORTED_PLATFORM TRUE) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 66 | IF(NOT CMAKE_SYSTEM_PROCESSOR) |
Marat Dukhan | e135eff | 2018-02-01 00:39:31 -0800 | [diff] [blame] | 67 | IF(NOT IOS) |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 68 | MESSAGE(WARNING |
| 69 | "Target processor architecture is not specified. " |
| 70 | "cpuinfo will compile, but cpuinfo_initialize() will always fail.") |
| 71 | SET(CPUINFO_SUPPORTED_PLATFORM FALSE) |
Marat Dukhan | e135eff | 2018-02-01 00:39:31 -0800 | [diff] [blame] | 72 | ENDIF() |
Marat Dukhan | b2fc4ab | 2018-02-19 22:43:26 -0800 | [diff] [blame] | 73 | ELSEIF(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|AMD64|x86_64|armv5te|armv7|armv7f|armv7s|armv7k|armv7-a|armv7l|arm64|aarch64)$") |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 74 | MESSAGE(WARNING |
| 75 | "Target processor architecture \"${CMAKE_SYSTEM_PROCESSOR}\" is not supported in cpuinfo. " |
| 76 | "cpuinfo will compile, but cpuinfo_initialize() will always fail.") |
| 77 | SET(CPUINFO_SUPPORTED_PLATFORM FALSE) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 78 | ENDIF() |
| 79 | |
| 80 | IF(NOT CMAKE_SYSTEM_NAME) |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 81 | MESSAGE(WARNING |
| 82 | "Target operating system is not specified. " |
| 83 | "cpuinfo will compile, but cpuinfo_initialize() will always fail.") |
| 84 | SET(CPUINFO_SUPPORTED_PLATFORM FALSE) |
Marat Dukhan | b2fc4ab | 2018-02-19 22:43:26 -0800 | [diff] [blame] | 85 | ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|Darwin|Linux|Android)$") |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 86 | MESSAGE(WARNING |
| 87 | "Target operating system \"${CMAKE_SYSTEM_NAME}\" is not supported in cpuinfo. " |
| 88 | "cpuinfo will compile, but cpuinfo_initialize() will always fail.") |
| 89 | SET(CPUINFO_SUPPORTED_PLATFORM FALSE) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 90 | ENDIF() |
| 91 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 92 | # ---[ Download deps |
| 93 | SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps |
| 94 | CACHE PATH "Confu-style dependencies source directory") |
| 95 | SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps |
| 96 | CACHE PATH "Confu-style dependencies binary directory") |
| 97 | |
Marat Dukhan | d581716 | 2018-01-31 18:39:05 -0800 | [diff] [blame] | 98 | IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 99 | IF(CPUINFO_SUPPORTED_PLATFORM AND NOT DEFINED GOOGLETEST_SOURCE_DIR) |
Marat Dukhan | d581716 | 2018-01-31 18:39:05 -0800 | [diff] [blame] | 100 | MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)") |
Marat Dukhan | d416acf | 2018-02-24 16:36:59 +0100 | [diff] [blame] | 101 | CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt") |
Marat Dukhan | d581716 | 2018-01-31 18:39:05 -0800 | [diff] [blame] | 102 | EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . |
Marat Dukhan | d416acf | 2018-02-24 16:36:59 +0100 | [diff] [blame] | 103 | WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download") |
Marat Dukhan | d581716 | 2018-01-31 18:39:05 -0800 | [diff] [blame] | 104 | EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build . |
Marat Dukhan | d416acf | 2018-02-24 16:36:59 +0100 | [diff] [blame] | 105 | WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download") |
Marat Dukhan | d581716 | 2018-01-31 18:39:05 -0800 | [diff] [blame] | 106 | SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory") |
| 107 | ENDIF() |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 108 | ENDIF() |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 109 | |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 110 | IF(CPUINFO_BUILD_BENCHMARKS) |
| 111 | IF(CPUINFO_SUPPORTED_PLATFORM AND NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR) |
| 112 | MESSAGE(STATUS "Downloading Google Benchmark to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)") |
| 113 | CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt") |
| 114 | EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . |
| 115 | WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download") |
| 116 | EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build . |
| 117 | WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download") |
| 118 | SET(GOOGLEBENCHMARK_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark" CACHE STRING "Google Benchmark source directory") |
| 119 | ENDIF() |
Marat Dukhan | cc44bf3 | 2017-12-18 17:45:48 -0800 | [diff] [blame] | 120 | ENDIF() |
| 121 | |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 122 | # ---[ cpuinfo library |
| 123 | SET(CPUINFO_SRCS |
| 124 | src/init.c |
| 125 | src/api.c |
| 126 | src/log.c) |
| 127 | |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 128 | IF(CPUINFO_SUPPORTED_PLATFORM) |
| 129 | IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64|AMD64)$") |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 130 | LIST(APPEND CPUINFO_SRCS |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 131 | src/x86/init.c |
| 132 | src/x86/info.c |
| 133 | src/x86/vendor.c |
| 134 | src/x86/uarch.c |
| 135 | src/x86/name.c |
| 136 | src/x86/topology.c |
| 137 | src/x86/isa.c |
| 138 | src/x86/cache/init.c |
| 139 | src/x86/cache/descriptor.c |
| 140 | src/x86/cache/deterministic.c) |
| 141 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 142 | LIST(APPEND CPUINFO_SRCS |
| 143 | src/x86/linux/init.c |
| 144 | src/x86/linux/cpuinfo.c) |
| 145 | ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
| 146 | LIST(APPEND CPUINFO_SRCS src/x86/mach/init.c) |
| 147 | ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
| 148 | LIST(APPEND CPUINFO_SRCS src/x86/windows/init.c) |
Marat Dukhan | 3985cf8 | 2017-12-18 18:58:26 -0800 | [diff] [blame] | 149 | ENDIF() |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 150 | ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7|armv7f|armv7s|armv7k|armv7-a|armv7l|arm64|aarch64)$" OR IOS) |
| 151 | LIST(APPEND CPUINFO_SRCS |
| 152 | src/arm/uarch.c |
| 153 | src/arm/cache.c) |
| 154 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 155 | LIST(APPEND CPUINFO_SRCS |
| 156 | src/arm/linux/init.c |
| 157 | src/arm/linux/cpuinfo.c |
| 158 | src/arm/linux/clusters.c |
| 159 | src/arm/linux/chipset.c |
| 160 | src/arm/linux/midr.c |
| 161 | src/arm/linux/hwcap.c) |
| 162 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 163 | LIST(APPEND CPUINFO_SRCS src/arm/android/gpu.c) |
Marat Dukhan | 7b73888 | 2017-10-18 16:59:28 -0700 | [diff] [blame] | 164 | ENDIF() |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 165 | IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7l|armv7-a)$") |
| 166 | LIST(APPEND CPUINFO_SRCS src/arm/linux/aarch32-isa.c) |
| 167 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND ANDROID_ABI STREQUAL "armeabi") |
| 168 | SET_SOURCE_FILES_PROPERTIES(src/arm/linux/aarch32-isa.c PROPERTIES COMPILE_FLAGS -marm) |
| 169 | ENDIF() |
| 170 | ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") |
| 171 | LIST(APPEND CPUINFO_SRCS src/arm/linux/aarch64-isa.c) |
| 172 | ENDIF() |
| 173 | ELSEIF(IOS) |
| 174 | LIST(APPEND CPUINFO_SRCS |
| 175 | src/arm/mach/init.c |
| 176 | src/gpu/gles-ios.m) |
| 177 | SET_SOURCE_FILES_PROPERTIES(src/gpu/gles-ios.m PROPERTIES COMPILE_FLAGS -fobjc-arc) |
Marat Dukhan | 7b73888 | 2017-10-18 16:59:28 -0700 | [diff] [blame] | 178 | ENDIF() |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 179 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 180 | LIST(APPEND CPUINFO_SRCS |
| 181 | src/arm/android/properties.c) |
| 182 | ENDIF() |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 183 | ENDIF() |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 184 | |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 185 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 186 | LIST(APPEND CPUINFO_SRCS |
| 187 | src/linux/smallfile.c |
| 188 | src/linux/multiline.c |
| 189 | src/linux/current.c |
| 190 | src/linux/cpulist.c |
| 191 | src/linux/processors.c) |
| 192 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 193 | LIST(APPEND CPUINFO_SRCS |
| 194 | src/gpu/gles2.c |
| 195 | src/linux/gpu.c) |
| 196 | ENDIF() |
| 197 | ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
| 198 | LIST(APPEND CPUINFO_SRCS src/mach/topology.c) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 199 | ENDIF() |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 200 | |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 201 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 202 | SET(CMAKE_THREAD_PREFER_PTHREAD TRUE) |
| 203 | SET(THREADS_PREFER_PTHREAD_FLAG TRUE) |
| 204 | FIND_PACKAGE(Threads REQUIRED) |
| 205 | ENDIF() |
Marat Dukhan | bfff348 | 2017-10-15 22:24:32 +0000 | [diff] [blame] | 206 | ENDIF() |
| 207 | |
Marat Dukhan | daafc28 | 2018-01-31 23:55:05 -0800 | [diff] [blame] | 208 | IF(CPUINFO_LIBRARY_TYPE STREQUAL "default") |
| 209 | ADD_LIBRARY(cpuinfo ${CPUINFO_SRCS}) |
| 210 | ELSEIF(CPUINFO_LIBRARY_TYPE STREQUAL "shared") |
| 211 | ADD_LIBRARY(cpuinfo SHARED ${CPUINFO_SRCS}) |
| 212 | ELSEIF(CPUINFO_LIBRARY_TYPE STREQUAL "static") |
| 213 | ADD_LIBRARY(cpuinfo STATIC ${CPUINFO_SRCS}) |
| 214 | ELSE() |
| 215 | MESSAGE(FATAL_ERROR "Unsupported library type ${CPUINFO_LIBRARY_TYPE}") |
| 216 | ENDIF() |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 217 | CPUINFO_TARGET_ENABLE_C99(cpuinfo) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 218 | CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 219 | SET_TARGET_PROPERTIES(cpuinfo PROPERTIES PUBLIC_HEADER include/cpuinfo.h) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 220 | TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC include) |
| 221 | TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PRIVATE src) |
Marat Dukhan | cf70aee | 2018-03-24 23:21:02 -0700 | [diff] [blame] | 222 | IF(CPUINFO_LOG_TO_STDIO) |
| 223 | TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_TO_STDIO=1) |
| 224 | ELSE() |
| 225 | TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_TO_STDIO=0) |
| 226 | ENDIF() |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 227 | IF(CPUINFO_SUPPORTED_PLATFORM) |
| 228 | TARGET_COMPILE_DEFINITIONS(cpuinfo INTERFACE CPUINFO_SUPPORTED_PLATFORM=1) |
| 229 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 230 | TARGET_LINK_LIBRARIES(cpuinfo PUBLIC ${CMAKE_THREAD_LIBS_INIT}) |
| 231 | ENDIF() |
| 232 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 233 | TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE _GNU_SOURCE=1) |
| 234 | ENDIF() |
Marat Dukhan | cf70aee | 2018-03-24 23:21:02 -0700 | [diff] [blame] | 235 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 236 | TARGET_LINK_LIBRARIES(cpuinfo PRIVATE log) |
| 237 | ENDIF() |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 238 | IF(IOS) |
| 239 | TARGET_LINK_LIBRARIES(cpuinfo INTERFACE "-framework OpenGLES") |
| 240 | TARGET_LINK_LIBRARIES(cpuinfo INTERFACE "-framework Foundation") |
| 241 | ENDIF() |
| 242 | ELSE() |
| 243 | TARGET_COMPILE_DEFINITIONS(cpuinfo INTERFACE CPUINFO_SUPPORTED_PLATFORM=0) |
Marat Dukhan | ad1ac95 | 2017-10-23 15:32:25 -0700 | [diff] [blame] | 244 | ENDIF() |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 245 | |
| 246 | INSTALL(TARGETS cpuinfo |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 247 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 248 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 249 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 250 | |
Marat Dukhan | cc44bf3 | 2017-12-18 17:45:48 -0800 | [diff] [blame] | 251 | # ---[ cpuinfo micro-benchmarks |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 252 | IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS) |
Marat Dukhan | cc44bf3 | 2017-12-18 17:45:48 -0800 | [diff] [blame] | 253 | # ---[ Build google benchmark |
| 254 | IF(NOT TARGET benchmark) |
| 255 | SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "") |
| 256 | ADD_SUBDIRECTORY( |
Marat Dukhan | d581716 | 2018-01-31 18:39:05 -0800 | [diff] [blame] | 257 | "${GOOGLEBENCHMARK_SOURCE_DIR}" |
Marat Dukhan | cc44bf3 | 2017-12-18 17:45:48 -0800 | [diff] [blame] | 258 | "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark") |
| 259 | ENDIF() |
| 260 | |
| 261 | IF(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Android)$") |
| 262 | ADD_EXECUTABLE(get-current-bench bench/get-current.cc) |
| 263 | TARGET_LINK_LIBRARIES(get-current-bench cpuinfo benchmark) |
| 264 | ENDIF() |
| 265 | |
| 266 | ADD_EXECUTABLE(init-bench bench/init.cc) |
| 267 | TARGET_LINK_LIBRARIES(init-bench cpuinfo benchmark) |
| 268 | ENDIF() |
| 269 | |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 270 | IF(CPUINFO_SUPPORTED_PLATFORM) |
| 271 | IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS) |
| 272 | # ---[ Build google test |
| 273 | IF(NOT TARGET gtest) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 274 | IF(MSVC AND NOT CPUINFO_RUNTIME_TYPE STREQUAL "static") |
| 275 | SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) |
| 276 | ENDIF() |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 277 | ADD_SUBDIRECTORY( |
| 278 | "${GOOGLETEST_SOURCE_DIR}" |
| 279 | "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest") |
| 280 | ENDIF() |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 281 | ENDIF() |
| 282 | ENDIF() |
| 283 | |
| 284 | # ---[ cpuinfo mock library and mock tests |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 285 | IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS) |
Marat Dukhan | b8a8337 | 2017-10-13 21:07:44 -0400 | [diff] [blame] | 286 | SET(CPUINFO_MOCK_SRCS "${CPUINFO_SRCS}") |
Marat Dukhan | fd0f3ef | 2017-12-18 17:45:18 -0800 | [diff] [blame] | 287 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 288 | LIST(REMOVE_ITEM CPUINFO_MOCK_SRCS src/gpu/gles2.c) |
| 289 | LIST(APPEND CPUINFO_MOCK_SRCS src/gpu/gles2-mock.c) |
| 290 | ENDIF() |
Marat Dukhan | 1b47462 | 2017-12-18 17:52:40 -0800 | [diff] [blame] | 291 | IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64)$") |
| 292 | LIST(APPEND CPUINFO_MOCK_SRCS src/x86/mockcpuid.c) |
| 293 | ENDIF() |
Marat Dukhan | b8a8337 | 2017-10-13 21:07:44 -0400 | [diff] [blame] | 294 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 295 | LIST(APPEND CPUINFO_MOCK_SRCS src/linux/mockfile.c) |
| 296 | ENDIF() |
| 297 | |
Marat Dukhan | daafc28 | 2018-01-31 23:55:05 -0800 | [diff] [blame] | 298 | ADD_LIBRARY(cpuinfo_mock STATIC ${CPUINFO_MOCK_SRCS}) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 299 | CPUINFO_TARGET_ENABLE_C99(cpuinfo_mock) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 300 | CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo_mock) |
Marat Dukhan | b8a8337 | 2017-10-13 21:07:44 -0400 | [diff] [blame] | 301 | SET_TARGET_PROPERTIES(cpuinfo_mock PROPERTIES PUBLIC_HEADER include/cpuinfo.h) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 302 | TARGET_INCLUDE_DIRECTORIES(cpuinfo_mock BEFORE PUBLIC include) |
| 303 | TARGET_INCLUDE_DIRECTORIES(cpuinfo_mock BEFORE PRIVATE src) |
| 304 | TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PUBLIC CPUINFO_MOCK=1) |
Marat Dukhan | cf70aee | 2018-03-24 23:21:02 -0700 | [diff] [blame] | 305 | TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE CPUINFO_LOG_TO_STDIO=1) |
Marat Dukhan | bfff348 | 2017-10-15 22:24:32 +0000 | [diff] [blame] | 306 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 307 | TARGET_LINK_LIBRARIES(cpuinfo_mock PUBLIC ${CMAKE_THREAD_LIBS_INIT}) |
| 308 | ENDIF() |
Marat Dukhan | e029fd4 | 2017-10-26 00:35:46 +0000 | [diff] [blame] | 309 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 310 | TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE _GNU_SOURCE=1) |
Marat Dukhan | e029fd4 | 2017-10-26 00:35:46 +0000 | [diff] [blame] | 311 | ENDIF() |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 312 | |
| 313 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a)$") |
Marat Dukhan | f18db83 | 2017-11-28 11:10:10 -0800 | [diff] [blame] | 314 | ADD_EXECUTABLE(atm7029b-tablet-test test/mock/atm7029b-tablet.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 315 | TARGET_INCLUDE_DIRECTORIES(atm7029b-tablet-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f18db83 | 2017-11-28 11:10:10 -0800 | [diff] [blame] | 316 | TARGET_LINK_LIBRARIES(atm7029b-tablet-test PRIVATE cpuinfo_mock gtest) |
| 317 | ADD_TEST(atm7029b-tablet-test atm7029b-tablet-test) |
| 318 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 319 | ADD_EXECUTABLE(blu-r1-hd-test test/mock/blu-r1-hd.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 320 | TARGET_INCLUDE_DIRECTORIES(blu-r1-hd-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 321 | TARGET_LINK_LIBRARIES(blu-r1-hd-test PRIVATE cpuinfo_mock gtest) |
| 322 | ADD_TEST(blu-r1-hd-test blu-r1-hd-test) |
| 323 | |
Marat Dukhan | 94f763a | 2017-12-04 16:44:33 -0800 | [diff] [blame] | 324 | ADD_EXECUTABLE(galaxy-a3-2016-eu-test test/mock/galaxy-a3-2016-eu.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 325 | TARGET_INCLUDE_DIRECTORIES(galaxy-a3-2016-eu-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 94f763a | 2017-12-04 16:44:33 -0800 | [diff] [blame] | 326 | TARGET_LINK_LIBRARIES(galaxy-a3-2016-eu-test PRIVATE cpuinfo_mock gtest) |
| 327 | ADD_TEST(galaxy-a3-2016-eu-test galaxy-a3-2016-eu-test) |
| 328 | |
Marat Dukhan | f9ccfa3 | 2017-11-27 15:50:06 -0800 | [diff] [blame] | 329 | ADD_EXECUTABLE(galaxy-a8-2016-duos-test test/mock/galaxy-a8-2016-duos.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 330 | TARGET_INCLUDE_DIRECTORIES(galaxy-a8-2016-duos-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f9ccfa3 | 2017-11-27 15:50:06 -0800 | [diff] [blame] | 331 | TARGET_LINK_LIBRARIES(galaxy-a8-2016-duos-test PRIVATE cpuinfo_mock gtest) |
| 332 | ADD_TEST(galaxy-a8-2016-duos-test galaxy-a8-2016-duos-test) |
| 333 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 334 | ADD_EXECUTABLE(galaxy-grand-prime-value-edition-test test/mock/galaxy-grand-prime-value-edition.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 335 | TARGET_INCLUDE_DIRECTORIES(galaxy-grand-prime-value-edition-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 336 | TARGET_LINK_LIBRARIES(galaxy-grand-prime-value-edition-test PRIVATE cpuinfo_mock gtest) |
| 337 | ADD_TEST(galaxy-grand-prime-value-edition-test galaxy-grand-prime-value-edition-test) |
| 338 | |
Marat Dukhan | d77e1a2 | 2018-01-04 19:45:06 -0800 | [diff] [blame] | 339 | ADD_EXECUTABLE(galaxy-j1-2016-test test/mock/galaxy-j1-2016.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 340 | TARGET_INCLUDE_DIRECTORIES(galaxy-j1-2016-test BEFORE PRIVATE test/mock) |
Marat Dukhan | d77e1a2 | 2018-01-04 19:45:06 -0800 | [diff] [blame] | 341 | TARGET_LINK_LIBRARIES(galaxy-j1-2016-test PRIVATE cpuinfo_mock gtest) |
| 342 | ADD_TEST(galaxy-j1-2016-test galaxy-j1-2016-test) |
| 343 | |
Marat Dukhan | 126c46d | 2017-12-04 16:24:48 -0800 | [diff] [blame] | 344 | ADD_EXECUTABLE(galaxy-j5-test test/mock/galaxy-j5.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 345 | TARGET_INCLUDE_DIRECTORIES(galaxy-j5-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 126c46d | 2017-12-04 16:24:48 -0800 | [diff] [blame] | 346 | TARGET_LINK_LIBRARIES(galaxy-j5-test PRIVATE cpuinfo_mock gtest) |
| 347 | ADD_TEST(galaxy-j5-test galaxy-j5-test) |
| 348 | |
Marat Dukhan | 8443590 | 2017-11-29 15:53:58 -0800 | [diff] [blame] | 349 | ADD_EXECUTABLE(galaxy-j7-prime-test test/mock/galaxy-j7-prime.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 350 | TARGET_INCLUDE_DIRECTORIES(galaxy-j7-prime-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 8443590 | 2017-11-29 15:53:58 -0800 | [diff] [blame] | 351 | TARGET_LINK_LIBRARIES(galaxy-j7-prime-test PRIVATE cpuinfo_mock gtest) |
| 352 | ADD_TEST(galaxy-j7-prime-test galaxy-j7-prime-test) |
| 353 | |
Marat Dukhan | 0d2aaa7 | 2017-11-29 15:48:46 -0800 | [diff] [blame] | 354 | ADD_EXECUTABLE(galaxy-j7-tmobile-test test/mock/galaxy-j7-tmobile.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 355 | TARGET_INCLUDE_DIRECTORIES(galaxy-j7-tmobile-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 0d2aaa7 | 2017-11-29 15:48:46 -0800 | [diff] [blame] | 356 | TARGET_LINK_LIBRARIES(galaxy-j7-tmobile-test PRIVATE cpuinfo_mock gtest) |
| 357 | ADD_TEST(galaxy-j7-tmobile-test galaxy-j7-tmobile-test) |
| 358 | |
| 359 | ADD_EXECUTABLE(galaxy-j7-uae-test test/mock/galaxy-j7-uae.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 360 | TARGET_INCLUDE_DIRECTORIES(galaxy-j7-uae-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 0d2aaa7 | 2017-11-29 15:48:46 -0800 | [diff] [blame] | 361 | TARGET_LINK_LIBRARIES(galaxy-j7-uae-test PRIVATE cpuinfo_mock gtest) |
| 362 | ADD_TEST(galaxy-j7-uae-test galaxy-j7-uae-test) |
| 363 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 364 | ADD_EXECUTABLE(galaxy-s3-us-test test/mock/galaxy-s3-us.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 365 | TARGET_INCLUDE_DIRECTORIES(galaxy-s3-us-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 366 | TARGET_LINK_LIBRARIES(galaxy-s3-us-test PRIVATE cpuinfo_mock gtest) |
| 367 | ADD_TEST(galaxy-s3-us-test galaxy-s3-us-test) |
| 368 | |
| 369 | ADD_EXECUTABLE(galaxy-s4-us-test test/mock/galaxy-s4-us.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 370 | TARGET_INCLUDE_DIRECTORIES(galaxy-s4-us-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 371 | TARGET_LINK_LIBRARIES(galaxy-s4-us-test PRIVATE cpuinfo_mock gtest) |
| 372 | ADD_TEST(galaxy-s4-us-test galaxy-s4-us-test) |
| 373 | |
| 374 | ADD_EXECUTABLE(galaxy-s5-global-test test/mock/galaxy-s5-global.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 375 | TARGET_INCLUDE_DIRECTORIES(galaxy-s5-global-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 376 | TARGET_LINK_LIBRARIES(galaxy-s5-global-test PRIVATE cpuinfo_mock gtest) |
| 377 | ADD_TEST(galaxy-s5-global-test galaxy-s5-global-test) |
| 378 | |
| 379 | ADD_EXECUTABLE(galaxy-s5-us-test test/mock/galaxy-s5-us.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 380 | TARGET_INCLUDE_DIRECTORIES(galaxy-s5-us-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 381 | TARGET_LINK_LIBRARIES(galaxy-s5-us-test PRIVATE cpuinfo_mock gtest) |
| 382 | ADD_TEST(galaxy-s5-us-test galaxy-s5-us-test) |
| 383 | |
| 384 | ADD_EXECUTABLE(galaxy-tab-3-7.0-test test/mock/galaxy-tab-3-7.0.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 385 | TARGET_INCLUDE_DIRECTORIES(galaxy-tab-3-7.0-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 386 | TARGET_LINK_LIBRARIES(galaxy-tab-3-7.0-test PRIVATE cpuinfo_mock gtest) |
| 387 | ADD_TEST(galaxy-tab-3-7.0-test galaxy-tab-3-7.0-test) |
| 388 | |
| 389 | ADD_EXECUTABLE(galaxy-tab-3-lite-test test/mock/galaxy-tab-3-lite.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 390 | TARGET_INCLUDE_DIRECTORIES(galaxy-tab-3-lite-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 391 | TARGET_LINK_LIBRARIES(galaxy-tab-3-lite-test PRIVATE cpuinfo_mock gtest) |
| 392 | ADD_TEST(galaxy-tab-3-lite-test galaxy-tab-3-lite-test) |
| 393 | |
| 394 | ADD_EXECUTABLE(galaxy-win-duos-test test/mock/galaxy-win-duos.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 395 | TARGET_INCLUDE_DIRECTORIES(galaxy-win-duos-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 396 | TARGET_LINK_LIBRARIES(galaxy-win-duos-test PRIVATE cpuinfo_mock gtest) |
| 397 | ADD_TEST(galaxy-win-duos-test galaxy-win-duos-test) |
| 398 | |
| 399 | ADD_EXECUTABLE(huawei-ascend-p7-test test/mock/huawei-ascend-p7.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 400 | TARGET_INCLUDE_DIRECTORIES(huawei-ascend-p7-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 401 | TARGET_LINK_LIBRARIES(huawei-ascend-p7-test PRIVATE cpuinfo_mock gtest) |
| 402 | ADD_TEST(huawei-ascend-p7-test huawei-ascend-p7-test) |
| 403 | |
| 404 | ADD_EXECUTABLE(lenovo-a6600-plus-test test/mock/lenovo-a6600-plus.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 405 | TARGET_INCLUDE_DIRECTORIES(lenovo-a6600-plus-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 406 | TARGET_LINK_LIBRARIES(lenovo-a6600-plus-test PRIVATE cpuinfo_mock gtest) |
| 407 | ADD_TEST(lenovo-a6600-plus-test lenovo-a6600-plus-test) |
| 408 | |
| 409 | ADD_EXECUTABLE(lenovo-vibe-x2-test test/mock/lenovo-vibe-x2.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 410 | TARGET_INCLUDE_DIRECTORIES(lenovo-vibe-x2-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 411 | TARGET_LINK_LIBRARIES(lenovo-vibe-x2-test PRIVATE cpuinfo_mock gtest) |
| 412 | ADD_TEST(lenovo-vibe-x2-test lenovo-vibe-x2-test) |
| 413 | |
| 414 | ADD_EXECUTABLE(lg-k10-eu-test test/mock/lg-k10-eu.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 415 | TARGET_INCLUDE_DIRECTORIES(lg-k10-eu-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 416 | TARGET_LINK_LIBRARIES(lg-k10-eu-test PRIVATE cpuinfo_mock gtest) |
| 417 | ADD_TEST(lg-k10-eu-test lg-k10-eu-test) |
| 418 | |
Marat Dukhan | dc58d50 | 2018-01-04 20:25:30 -0800 | [diff] [blame] | 419 | ADD_EXECUTABLE(lg-optimus-g-pro-test test/mock/lg-optimus-g-pro.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 420 | TARGET_INCLUDE_DIRECTORIES(lg-optimus-g-pro-test BEFORE PRIVATE test/mock) |
Marat Dukhan | dc58d50 | 2018-01-04 20:25:30 -0800 | [diff] [blame] | 421 | TARGET_LINK_LIBRARIES(lg-optimus-g-pro-test PRIVATE cpuinfo_mock gtest) |
| 422 | ADD_TEST(lg-optimus-g-pro-test lg-optimus-g-pro-test) |
| 423 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 424 | ADD_EXECUTABLE(moto-e-gen1-test test/mock/moto-e-gen1.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 425 | TARGET_INCLUDE_DIRECTORIES(moto-e-gen1-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 426 | TARGET_LINK_LIBRARIES(moto-e-gen1-test PRIVATE cpuinfo_mock gtest) |
| 427 | ADD_TEST(moto-e-gen1-test moto-e-gen1-test) |
| 428 | |
Marat Dukhan | 92db81f | 2018-01-05 19:01:52 -0800 | [diff] [blame] | 429 | ADD_EXECUTABLE(moto-g-gen1-test test/mock/moto-g-gen1.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 430 | TARGET_INCLUDE_DIRECTORIES(moto-g-gen1-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 92db81f | 2018-01-05 19:01:52 -0800 | [diff] [blame] | 431 | TARGET_LINK_LIBRARIES(moto-g-gen1-test PRIVATE cpuinfo_mock gtest) |
| 432 | ADD_TEST(moto-g-gen1-test moto-g-gen1-test) |
| 433 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 434 | ADD_EXECUTABLE(moto-g-gen2-test test/mock/moto-g-gen2.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 435 | TARGET_INCLUDE_DIRECTORIES(moto-g-gen2-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 436 | TARGET_LINK_LIBRARIES(moto-g-gen2-test PRIVATE cpuinfo_mock gtest) |
| 437 | ADD_TEST(moto-g-gen2-test moto-g-gen2-test) |
| 438 | |
| 439 | ADD_EXECUTABLE(moto-g-gen3-test test/mock/moto-g-gen3.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 440 | TARGET_INCLUDE_DIRECTORIES(moto-g-gen3-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 441 | TARGET_LINK_LIBRARIES(moto-g-gen3-test PRIVATE cpuinfo_mock gtest) |
| 442 | ADD_TEST(moto-g-gen3-test moto-g-gen3-test) |
| 443 | |
Marat Dukhan | 7682923 | 2018-03-02 12:58:30 -0800 | [diff] [blame] | 444 | ADD_EXECUTABLE(moto-g-gen4-test test/mock/moto-g-gen4.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 445 | TARGET_INCLUDE_DIRECTORIES(moto-g-gen4-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 7682923 | 2018-03-02 12:58:30 -0800 | [diff] [blame] | 446 | TARGET_LINK_LIBRARIES(moto-g-gen4-test PRIVATE cpuinfo_mock gtest) |
| 447 | ADD_TEST(moto-g-gen4-test moto-g-gen4-test) |
| 448 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 449 | ADD_EXECUTABLE(nexus-s-test test/mock/nexus-s.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 450 | TARGET_INCLUDE_DIRECTORIES(nexus-s-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 451 | TARGET_LINK_LIBRARIES(nexus-s-test PRIVATE cpuinfo_mock gtest) |
| 452 | ADD_TEST(nexus-s-test nexus-s-test) |
| 453 | |
| 454 | ADD_EXECUTABLE(nexus4-test test/mock/nexus4.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 455 | TARGET_INCLUDE_DIRECTORIES(nexus4-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 456 | TARGET_LINK_LIBRARIES(nexus4-test PRIVATE cpuinfo_mock gtest) |
| 457 | ADD_TEST(nexus4-test nexus4-test) |
| 458 | |
| 459 | ADD_EXECUTABLE(nexus6-test test/mock/nexus6.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 460 | TARGET_INCLUDE_DIRECTORIES(nexus6-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 461 | TARGET_LINK_LIBRARIES(nexus6-test PRIVATE cpuinfo_mock gtest) |
| 462 | ADD_TEST(nexus6-test nexus6-test) |
| 463 | |
Marat Dukhan | 2ca13b2 | 2018-01-04 18:52:46 -0800 | [diff] [blame] | 464 | ADD_EXECUTABLE(nexus10-test test/mock/nexus10.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 465 | TARGET_INCLUDE_DIRECTORIES(nexus10-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 2ca13b2 | 2018-01-04 18:52:46 -0800 | [diff] [blame] | 466 | TARGET_LINK_LIBRARIES(nexus10-test PRIVATE cpuinfo_mock gtest) |
| 467 | ADD_TEST(nexus10-test nexus10-test) |
| 468 | |
Marat Dukhan | 5957254 | 2017-11-27 17:22:09 -0800 | [diff] [blame] | 469 | ADD_EXECUTABLE(padcod-10.1-test test/mock/padcod-10.1.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 470 | TARGET_INCLUDE_DIRECTORIES(padcod-10.1-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 5957254 | 2017-11-27 17:22:09 -0800 | [diff] [blame] | 471 | TARGET_LINK_LIBRARIES(padcod-10.1-test PRIVATE cpuinfo_mock gtest) |
| 472 | ADD_TEST(padcod-10.1-test padcod-10.1-test) |
| 473 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 474 | ADD_EXECUTABLE(xiaomi-redmi-2a-test test/mock/xiaomi-redmi-2a.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 475 | TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-2a-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 476 | TARGET_LINK_LIBRARIES(xiaomi-redmi-2a-test PRIVATE cpuinfo_mock gtest) |
| 477 | ADD_TEST(xiaomi-redmi-2a-test xiaomi-redmi-2a-test) |
Marat Dukhan | ad74184 | 2017-12-03 23:11:46 -0800 | [diff] [blame] | 478 | |
| 479 | ADD_EXECUTABLE(xperia-sl-test test/mock/xperia-sl.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 480 | TARGET_INCLUDE_DIRECTORIES(xperia-sl-test BEFORE PRIVATE test/mock) |
Marat Dukhan | ad74184 | 2017-12-03 23:11:46 -0800 | [diff] [blame] | 481 | TARGET_LINK_LIBRARIES(xperia-sl-test PRIVATE cpuinfo_mock gtest) |
| 482 | ADD_TEST(xperia-sl-test xperia-sl-test) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 483 | ENDIF() |
| 484 | |
| 485 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a|aarch64)$") |
Marat Dukhan | c246e32 | 2018-01-26 11:21:48 -0800 | [diff] [blame] | 486 | ADD_EXECUTABLE(alcatel-revvl-test test/mock/alcatel-revvl.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 487 | TARGET_INCLUDE_DIRECTORIES(alcatel-revvl-test BEFORE PRIVATE test/mock) |
Marat Dukhan | c246e32 | 2018-01-26 11:21:48 -0800 | [diff] [blame] | 488 | TARGET_LINK_LIBRARIES(alcatel-revvl-test PRIVATE cpuinfo_mock gtest) |
| 489 | ADD_TEST(alcatel-revvl-test alcatel-revvl-test) |
| 490 | |
Marat Dukhan | 89a3f08 | 2018-03-13 11:59:03 -0700 | [diff] [blame] | 491 | ADD_EXECUTABLE(galaxy-a8-2018-test test/mock/galaxy-a8-2018.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 492 | TARGET_INCLUDE_DIRECTORIES(galaxy-a8-2018-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 89a3f08 | 2018-03-13 11:59:03 -0700 | [diff] [blame] | 493 | TARGET_LINK_LIBRARIES(galaxy-a8-2018-test PRIVATE cpuinfo_mock gtest) |
| 494 | ADD_TEST(galaxy-a8-2018-test galaxy-a8-2018-test) |
| 495 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 496 | ADD_EXECUTABLE(galaxy-c9-pro-test test/mock/galaxy-c9-pro.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 497 | TARGET_INCLUDE_DIRECTORIES(galaxy-c9-pro-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 498 | TARGET_LINK_LIBRARIES(galaxy-c9-pro-test PRIVATE cpuinfo_mock gtest) |
| 499 | ADD_TEST(galaxy-c9-pro-test galaxy-c9-pro-test) |
| 500 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 501 | ADD_EXECUTABLE(galaxy-s6-test test/mock/galaxy-s6.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 502 | TARGET_INCLUDE_DIRECTORIES(galaxy-s6-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 503 | TARGET_LINK_LIBRARIES(galaxy-s6-test PRIVATE cpuinfo_mock gtest) |
| 504 | ADD_TEST(galaxy-s6-test galaxy-s6-test) |
| 505 | |
| 506 | ADD_EXECUTABLE(galaxy-s7-us-test test/mock/galaxy-s7-us.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 507 | TARGET_INCLUDE_DIRECTORIES(galaxy-s7-us-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 508 | TARGET_LINK_LIBRARIES(galaxy-s7-us-test PRIVATE cpuinfo_mock gtest) |
| 509 | ADD_TEST(galaxy-s7-us-test galaxy-s7-us-test) |
| 510 | |
| 511 | ADD_EXECUTABLE(galaxy-s7-global-test test/mock/galaxy-s7-global.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 512 | TARGET_INCLUDE_DIRECTORIES(galaxy-s7-global-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 513 | TARGET_LINK_LIBRARIES(galaxy-s7-global-test PRIVATE cpuinfo_mock gtest) |
| 514 | ADD_TEST(galaxy-s7-global-test galaxy-s7-global-test) |
| 515 | |
| 516 | ADD_EXECUTABLE(galaxy-s8-us-test test/mock/galaxy-s8-us.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 517 | TARGET_INCLUDE_DIRECTORIES(galaxy-s8-us-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 518 | TARGET_LINK_LIBRARIES(galaxy-s8-us-test PRIVATE cpuinfo_mock gtest) |
| 519 | ADD_TEST(galaxy-s8-us-test galaxy-s8-us-test) |
| 520 | |
| 521 | ADD_EXECUTABLE(galaxy-s8-global-test test/mock/galaxy-s8-global.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 522 | TARGET_INCLUDE_DIRECTORIES(galaxy-s8-global-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 523 | TARGET_LINK_LIBRARIES(galaxy-s8-global-test PRIVATE cpuinfo_mock gtest) |
| 524 | ADD_TEST(galaxy-s8-global-test galaxy-s8-global-test) |
| 525 | |
Marat Dukhan | d51d395 | 2018-03-17 19:18:06 -0700 | [diff] [blame] | 526 | ADD_EXECUTABLE(galaxy-s9-us-test test/mock/galaxy-s9-us.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 527 | TARGET_INCLUDE_DIRECTORIES(galaxy-s9-us-test BEFORE PRIVATE test/mock) |
Marat Dukhan | d51d395 | 2018-03-17 19:18:06 -0700 | [diff] [blame] | 528 | TARGET_LINK_LIBRARIES(galaxy-s9-us-test PRIVATE cpuinfo_mock gtest) |
| 529 | ADD_TEST(galaxy-s9-us-test galaxy-s9-us-test) |
| 530 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 531 | ADD_EXECUTABLE(huawei-mate-8-test test/mock/huawei-mate-8.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 532 | TARGET_INCLUDE_DIRECTORIES(huawei-mate-8-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 533 | TARGET_LINK_LIBRARIES(huawei-mate-8-test PRIVATE cpuinfo_mock gtest) |
| 534 | ADD_TEST(huawei-mate-8-test huawei-mate-8-test) |
| 535 | |
| 536 | ADD_EXECUTABLE(huawei-mate-9-test test/mock/huawei-mate-9.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 537 | TARGET_INCLUDE_DIRECTORIES(huawei-mate-9-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 538 | TARGET_LINK_LIBRARIES(huawei-mate-9-test PRIVATE cpuinfo_mock gtest) |
| 539 | ADD_TEST(huawei-mate-9-test huawei-mate-9-test) |
| 540 | |
Marat Dukhan | 7be1140 | 2017-11-27 14:57:02 -0800 | [diff] [blame] | 541 | ADD_EXECUTABLE(huawei-mate-10-test test/mock/huawei-mate-10.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 542 | TARGET_INCLUDE_DIRECTORIES(huawei-mate-10-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 7be1140 | 2017-11-27 14:57:02 -0800 | [diff] [blame] | 543 | TARGET_LINK_LIBRARIES(huawei-mate-10-test PRIVATE cpuinfo_mock gtest) |
| 544 | ADD_TEST(huawei-mate-10-test huawei-mate-10-test) |
| 545 | |
Marat Dukhan | 705122f | 2018-01-03 18:24:55 -0800 | [diff] [blame] | 546 | ADD_EXECUTABLE(huawei-p8-lite-test test/mock/huawei-p8-lite.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 547 | TARGET_INCLUDE_DIRECTORIES(huawei-p8-lite-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 705122f | 2018-01-03 18:24:55 -0800 | [diff] [blame] | 548 | TARGET_LINK_LIBRARIES(huawei-p8-lite-test PRIVATE cpuinfo_mock gtest) |
| 549 | ADD_TEST(huawei-p8-lite-test huawei-p8-lite-test) |
| 550 | |
| 551 | ADD_EXECUTABLE(huawei-p9-lite-test test/mock/huawei-p9-lite.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 552 | TARGET_INCLUDE_DIRECTORIES(huawei-p9-lite-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 705122f | 2018-01-03 18:24:55 -0800 | [diff] [blame] | 553 | TARGET_LINK_LIBRARIES(huawei-p9-lite-test PRIVATE cpuinfo_mock gtest) |
| 554 | ADD_TEST(huawei-p9-lite-test huawei-p9-lite-test) |
| 555 | |
| 556 | ADD_EXECUTABLE(iconia-one-10-test test/mock/iconia-one-10.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 557 | TARGET_INCLUDE_DIRECTORIES(iconia-one-10-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 705122f | 2018-01-03 18:24:55 -0800 | [diff] [blame] | 558 | TARGET_LINK_LIBRARIES(iconia-one-10-test PRIVATE cpuinfo_mock gtest) |
| 559 | ADD_TEST(iconia-one-10-test iconia-one-10-test) |
| 560 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 561 | ADD_EXECUTABLE(meizu-pro-6-test test/mock/meizu-pro-6.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 562 | TARGET_INCLUDE_DIRECTORIES(meizu-pro-6-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 563 | TARGET_LINK_LIBRARIES(meizu-pro-6-test PRIVATE cpuinfo_mock gtest) |
| 564 | ADD_TEST(meizu-pro-6-test meizu-pro-6-test) |
| 565 | |
| 566 | ADD_EXECUTABLE(meizu-pro-6s-test test/mock/meizu-pro-6s.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 567 | TARGET_INCLUDE_DIRECTORIES(meizu-pro-6s-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 568 | TARGET_LINK_LIBRARIES(meizu-pro-6s-test PRIVATE cpuinfo_mock gtest) |
| 569 | ADD_TEST(meizu-pro-6s-test meizu-pro-6s-test) |
| 570 | |
| 571 | ADD_EXECUTABLE(meizu-pro-7-plus-test test/mock/meizu-pro-7-plus.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 572 | TARGET_INCLUDE_DIRECTORIES(meizu-pro-7-plus-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 573 | TARGET_LINK_LIBRARIES(meizu-pro-7-plus-test PRIVATE cpuinfo_mock gtest) |
| 574 | ADD_TEST(meizu-pro-7-plus-test meizu-pro-7-plus-test) |
| 575 | |
| 576 | ADD_EXECUTABLE(nexus5x-test test/mock/nexus5x.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 577 | TARGET_INCLUDE_DIRECTORIES(nexus5x-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 578 | TARGET_LINK_LIBRARIES(nexus5x-test PRIVATE cpuinfo_mock gtest) |
| 579 | ADD_TEST(nexus5x-test nexus5x-test) |
| 580 | |
| 581 | ADD_EXECUTABLE(nexus6p-test test/mock/nexus6p.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 582 | TARGET_INCLUDE_DIRECTORIES(nexus6p-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 583 | TARGET_LINK_LIBRARIES(nexus6p-test PRIVATE cpuinfo_mock gtest) |
| 584 | ADD_TEST(nexus6p-test nexus6p-test) |
| 585 | |
| 586 | ADD_EXECUTABLE(nexus9-test test/mock/nexus9.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 587 | TARGET_INCLUDE_DIRECTORIES(nexus9-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 588 | TARGET_LINK_LIBRARIES(nexus9-test PRIVATE cpuinfo_mock gtest) |
| 589 | ADD_TEST(nexus9-test nexus9-test) |
| 590 | |
Marat Dukhan | 4d4d7e2 | 2018-03-02 10:34:59 -0800 | [diff] [blame] | 591 | ADD_EXECUTABLE(oneplus-3t-test test/mock/oneplus-3t.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 592 | TARGET_INCLUDE_DIRECTORIES(oneplus-3t-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 4d4d7e2 | 2018-03-02 10:34:59 -0800 | [diff] [blame] | 593 | TARGET_LINK_LIBRARIES(oneplus-3t-test PRIVATE cpuinfo_mock gtest) |
| 594 | ADD_TEST(oneplus-3t-test oneplus-3t-test) |
| 595 | |
Marat Dukhan | 52621bb | 2018-03-02 10:51:11 -0800 | [diff] [blame] | 596 | ADD_EXECUTABLE(oneplus-5-test test/mock/oneplus-5.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 597 | TARGET_INCLUDE_DIRECTORIES(oneplus-5-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 52621bb | 2018-03-02 10:51:11 -0800 | [diff] [blame] | 598 | TARGET_LINK_LIBRARIES(oneplus-5-test PRIVATE cpuinfo_mock gtest) |
| 599 | ADD_TEST(oneplus-5-test oneplus-5-test) |
| 600 | |
Marat Dukhan | d00216b | 2018-03-02 11:43:51 -0800 | [diff] [blame] | 601 | ADD_EXECUTABLE(oneplus-5t-test test/mock/oneplus-5t.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 602 | TARGET_INCLUDE_DIRECTORIES(oneplus-5t-test BEFORE PRIVATE test/mock) |
Marat Dukhan | d00216b | 2018-03-02 11:43:51 -0800 | [diff] [blame] | 603 | TARGET_LINK_LIBRARIES(oneplus-5t-test PRIVATE cpuinfo_mock gtest) |
| 604 | ADD_TEST(oneplus-5t-test oneplus-5t-test) |
| 605 | |
Marat Dukhan | 75dd8a1 | 2017-12-04 15:43:02 -0800 | [diff] [blame] | 606 | ADD_EXECUTABLE(oppo-a37-test test/mock/oppo-a37.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 607 | TARGET_INCLUDE_DIRECTORIES(oppo-a37-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 75dd8a1 | 2017-12-04 15:43:02 -0800 | [diff] [blame] | 608 | TARGET_LINK_LIBRARIES(oppo-a37-test PRIVATE cpuinfo_mock gtest) |
| 609 | ADD_TEST(oppo-a37-test oppo-a37-test) |
| 610 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 611 | ADD_EXECUTABLE(oppo-r9-test test/mock/oppo-r9.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 612 | TARGET_INCLUDE_DIRECTORIES(oppo-r9-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 613 | TARGET_LINK_LIBRARIES(oppo-r9-test PRIVATE cpuinfo_mock gtest) |
| 614 | ADD_TEST(oppo-r9-test oppo-r9-test) |
| 615 | |
| 616 | ADD_EXECUTABLE(pixel-test test/mock/pixel.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 617 | TARGET_INCLUDE_DIRECTORIES(pixel-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 618 | TARGET_LINK_LIBRARIES(pixel-test PRIVATE cpuinfo_mock gtest) |
| 619 | ADD_TEST(pixel-test pixel-test) |
| 620 | |
| 621 | ADD_EXECUTABLE(pixel-c-test test/mock/pixel-c.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 622 | TARGET_INCLUDE_DIRECTORIES(pixel-c-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 623 | TARGET_LINK_LIBRARIES(pixel-c-test PRIVATE cpuinfo_mock gtest) |
| 624 | ADD_TEST(pixel-c-test pixel-c-test) |
| 625 | |
| 626 | ADD_EXECUTABLE(pixel-xl-test test/mock/pixel-xl.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 627 | TARGET_INCLUDE_DIRECTORIES(pixel-xl-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 628 | TARGET_LINK_LIBRARIES(pixel-xl-test PRIVATE cpuinfo_mock gtest) |
| 629 | ADD_TEST(pixel-xl-test pixel-xl-test) |
| 630 | |
Marat Dukhan | 9bfb107 | 2017-11-27 17:02:25 -0800 | [diff] [blame] | 631 | ADD_EXECUTABLE(pixel-2-xl-test test/mock/pixel-2-xl.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 632 | TARGET_INCLUDE_DIRECTORIES(pixel-2-xl-test BEFORE PRIVATE test/mock) |
Marat Dukhan | 9bfb107 | 2017-11-27 17:02:25 -0800 | [diff] [blame] | 633 | TARGET_LINK_LIBRARIES(pixel-2-xl-test PRIVATE cpuinfo_mock gtest) |
| 634 | ADD_TEST(pixel-2-xl-test pixel-2-xl-test) |
| 635 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 636 | ADD_EXECUTABLE(xiaomi-mi-5c-test test/mock/xiaomi-mi-5c.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 637 | TARGET_INCLUDE_DIRECTORIES(xiaomi-mi-5c-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 638 | TARGET_LINK_LIBRARIES(xiaomi-mi-5c-test PRIVATE cpuinfo_mock gtest) |
| 639 | ADD_TEST(xiaomi-mi-5c-test xiaomi-mi-5c-test) |
| 640 | |
| 641 | ADD_EXECUTABLE(xiaomi-redmi-note-3-test test/mock/xiaomi-redmi-note-3.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 642 | TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-note-3-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 643 | TARGET_LINK_LIBRARIES(xiaomi-redmi-note-3-test PRIVATE cpuinfo_mock gtest) |
| 644 | ADD_TEST(xiaomi-redmi-note-3-test xiaomi-redmi-note-3-test) |
| 645 | |
Marat Dukhan | a5fda23 | 2017-12-04 16:08:25 -0800 | [diff] [blame] | 646 | ADD_EXECUTABLE(xiaomi-redmi-note-4-test test/mock/xiaomi-redmi-note-4.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 647 | TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-note-4-test BEFORE PRIVATE test/mock) |
Marat Dukhan | a5fda23 | 2017-12-04 16:08:25 -0800 | [diff] [blame] | 648 | TARGET_LINK_LIBRARIES(xiaomi-redmi-note-4-test PRIVATE cpuinfo_mock gtest) |
| 649 | ADD_TEST(xiaomi-redmi-note-4-test xiaomi-redmi-note-4-test) |
| 650 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 651 | ADD_EXECUTABLE(xperia-c4-dual-test test/mock/xperia-c4-dual.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 652 | TARGET_INCLUDE_DIRECTORIES(xperia-c4-dual-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 653 | TARGET_LINK_LIBRARIES(xperia-c4-dual-test PRIVATE cpuinfo_mock gtest) |
| 654 | ADD_TEST(xperia-c4-dual-test xperia-c4-dual-test) |
| 655 | ENDIF() |
| 656 | |
| 657 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64)$") |
Marat Dukhan | af8a12d | 2017-12-08 16:12:16 -0800 | [diff] [blame] | 658 | ADD_EXECUTABLE(alldocube-iwork8-test test/mock/alldocube-iwork8.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 659 | TARGET_INCLUDE_DIRECTORIES(alldocube-iwork8-test BEFORE PRIVATE test/mock) |
Marat Dukhan | af8a12d | 2017-12-08 16:12:16 -0800 | [diff] [blame] | 660 | TARGET_LINK_LIBRARIES(alldocube-iwork8-test PRIVATE cpuinfo_mock gtest) |
| 661 | ADD_TEST(alldocube-iwork8-test alldocube-iwork8-test) |
| 662 | |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 663 | ADD_EXECUTABLE(memo-pad-7-test test/mock/memo-pad-7.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 664 | TARGET_INCLUDE_DIRECTORIES(memo-pad-7-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 665 | TARGET_LINK_LIBRARIES(memo-pad-7-test PRIVATE cpuinfo_mock gtest) |
| 666 | ADD_TEST(memo-pad-7-test memo-pad-7-test) |
| 667 | |
| 668 | ADD_EXECUTABLE(zenfone-c-test test/mock/zenfone-c.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 669 | TARGET_INCLUDE_DIRECTORIES(zenfone-c-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 670 | TARGET_LINK_LIBRARIES(zenfone-c-test PRIVATE cpuinfo_mock gtest) |
| 671 | ADD_TEST(zenfone-c-test zenfone-c-test) |
| 672 | |
| 673 | ADD_EXECUTABLE(zenfone-2-test test/mock/zenfone-2.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 674 | TARGET_INCLUDE_DIRECTORIES(zenfone-2-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 675 | TARGET_LINK_LIBRARIES(zenfone-2-test PRIVATE cpuinfo_mock gtest) |
| 676 | ADD_TEST(zenfone-2-test zenfone-2-test) |
| 677 | |
| 678 | ADD_EXECUTABLE(zenfone-2e-test test/mock/zenfone-2e.cc) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 679 | TARGET_INCLUDE_DIRECTORIES(zenfone-2e-test BEFORE PRIVATE test/mock) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 680 | TARGET_LINK_LIBRARIES(zenfone-2e-test PRIVATE cpuinfo_mock gtest) |
| 681 | ADD_TEST(zenfone-2e-test zenfone-2e-test) |
| 682 | ENDIF() |
| 683 | ENDIF() |
| 684 | |
| 685 | # ---[ cpuinfo unit tests |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 686 | IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_TESTS) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 687 | ADD_EXECUTABLE(init-test test/init.cc) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 688 | CPUINFO_TARGET_ENABLE_CXX11(init-test) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 689 | CPUINFO_TARGET_RUNTIME_LIBRARY(init-test) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 690 | TARGET_LINK_LIBRARIES(init-test PRIVATE cpuinfo gtest) |
| 691 | ADD_TEST(init-test init-test) |
| 692 | |
| 693 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") |
| 694 | ADD_EXECUTABLE(get-current-test test/get-current.cc) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 695 | CPUINFO_TARGET_ENABLE_CXX11(get-current-test) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 696 | CPUINFO_TARGET_RUNTIME_LIBRARY(get-current-test) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 697 | TARGET_LINK_LIBRARIES(get-current-test PRIVATE cpuinfo gtest) |
| 698 | ADD_TEST(get-current-test get-current-test) |
| 699 | ENDIF() |
| 700 | |
| 701 | IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64)$") |
| 702 | ADD_EXECUTABLE(brand-string-test test/name/brand-string.cc) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 703 | CPUINFO_TARGET_ENABLE_CXX11(brand-string-test) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 704 | CPUINFO_TARGET_RUNTIME_LIBRARY(brand-string-test) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 705 | TARGET_LINK_LIBRARIES(brand-string-test PRIVATE cpuinfo gtest gtest_main) |
| 706 | ADD_TEST(brand-string-test brand-string-test) |
| 707 | ENDIF() |
| 708 | |
| 709 | IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a|aarch64)$") |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 710 | ADD_LIBRARY(android_properties_interface STATIC test/name/android-properties-interface.c) |
| 711 | CPUINFO_TARGET_ENABLE_C99(android_properties_interface) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 712 | CPUINFO_TARGET_RUNTIME_LIBRARY(android_properties_interface) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 713 | TARGET_INCLUDE_DIRECTORIES(android_properties_interface PRIVATE src) |
| 714 | TARGET_LINK_LIBRARIES(android_properties_interface PRIVATE cpuinfo) |
| 715 | |
| 716 | ADD_EXECUTABLE(chipset-test |
| 717 | test/name/proc-cpuinfo-hardware.cc |
| 718 | test/name/ro-product-board.cc |
| 719 | test/name/ro-board-platform.cc |
| 720 | test/name/ro-mediatek-platform.cc |
Marat Dukhan | e5d6049 | 2018-03-08 12:47:27 -0800 | [diff] [blame] | 721 | test/name/ro-arch.cc |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 722 | test/name/ro-chipname.cc |
| 723 | test/name/android-properties.cc) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 724 | CPUINFO_TARGET_ENABLE_CXX11(chipset-test) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 725 | CPUINFO_TARGET_RUNTIME_LIBRARY(chipset-test) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 726 | TARGET_LINK_LIBRARIES(chipset-test PRIVATE android_properties_interface gtest gtest_main) |
| 727 | ADD_TEST(chipset-test chipset-test) |
| 728 | |
| 729 | ADD_EXECUTABLE(cache-test test/arm-cache.cc) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 730 | CPUINFO_TARGET_ENABLE_CXX11(cache-test) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 731 | CPUINFO_TARGET_RUNTIME_LIBRARY(cache-test) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 732 | TARGET_COMPILE_DEFINITIONS(cache-test PRIVATE __STDC_LIMIT_MACROS=1 __STDC_CONSTANT_MACROS=1) |
Marat Dukhan | f1c4a5c | 2017-10-25 17:22:11 -0700 | [diff] [blame] | 733 | TARGET_INCLUDE_DIRECTORIES(cache-test PRIVATE src) |
| 734 | TARGET_LINK_LIBRARIES(cache-test PRIVATE cpuinfo gtest gtest_main) |
| 735 | ADD_TEST(cache-test, cache-test) |
| 736 | ENDIF() |
Marat Dukhan | b8a8337 | 2017-10-13 21:07:44 -0400 | [diff] [blame] | 737 | ENDIF() |
| 738 | |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 739 | # ---[ Helper and debug tools |
Marat Dukhan | 249d314 | 2018-03-15 23:20:11 -0700 | [diff] [blame] | 740 | IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 741 | ADD_EXECUTABLE(isa-info tools/isa-info.c) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 742 | CPUINFO_TARGET_ENABLE_C99(isa-info) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 743 | CPUINFO_TARGET_RUNTIME_LIBRARY(isa-info) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 744 | TARGET_LINK_LIBRARIES(isa-info PRIVATE cpuinfo) |
| 745 | |
| 746 | ADD_EXECUTABLE(cpu-info tools/cpu-info.c) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 747 | CPUINFO_TARGET_ENABLE_C99(cpu-info) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 748 | CPUINFO_TARGET_RUNTIME_LIBRARY(cpu-info) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 749 | TARGET_LINK_LIBRARIES(cpu-info PRIVATE cpuinfo) |
| 750 | |
| 751 | ADD_EXECUTABLE(cache-info tools/cache-info.c) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 752 | CPUINFO_TARGET_ENABLE_C99(cache-info) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 753 | CPUINFO_TARGET_RUNTIME_LIBRARY(cache-info) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 754 | TARGET_LINK_LIBRARIES(cache-info PRIVATE cpuinfo) |
| 755 | |
Marat Dukhan | f3a71e6 | 2017-11-29 15:15:36 -0800 | [diff] [blame] | 756 | IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7|armv7-a|armv7l|arm64|aarch64)$") |
| 757 | ADD_EXECUTABLE(auxv-dump tools/auxv-dump.c) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 758 | CPUINFO_TARGET_ENABLE_C99(auxv-dump) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 759 | CPUINFO_TARGET_RUNTIME_LIBRARY(auxv-dump) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 760 | TARGET_INCLUDE_DIRECTORIES(auxv-dump BEFORE PRIVATE src) |
| 761 | TARGET_INCLUDE_DIRECTORIES(auxv-dump BEFORE PRIVATE include) |
Marat Dukhan | d4b4a12 | 2018-03-18 08:16:25 +0000 | [diff] [blame] | 762 | TARGET_LINK_LIBRARIES(auxv-dump PRIVATE ${CMAKE_DL_LIBS}) |
Marat Dukhan | f3a71e6 | 2017-11-29 15:15:36 -0800 | [diff] [blame] | 763 | ENDIF() |
| 764 | |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 765 | IF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|AMD64|x86_64)$") |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 766 | ADD_EXECUTABLE(cpuid-dump tools/cpuid-dump.c) |
Marat Dukhan | cddf01b | 2018-02-25 01:37:55 +0100 | [diff] [blame] | 767 | CPUINFO_TARGET_ENABLE_C99(cpuid-dump) |
Marat Dukhan | d0222b4 | 2018-03-26 11:19:48 -0700 | [diff] [blame] | 768 | CPUINFO_TARGET_RUNTIME_LIBRARY(cpuid-dump) |
Marat Dukhan | 806dcca | 2018-03-22 12:22:48 -0700 | [diff] [blame] | 769 | TARGET_INCLUDE_DIRECTORIES(cpuid-dump BEFORE PRIVATE src) |
| 770 | TARGET_INCLUDE_DIRECTORIES(cpuid-dump BEFORE PRIVATE include) |
Marat Dukhan | 3645b92 | 2017-10-13 17:03:35 -0400 | [diff] [blame] | 771 | ENDIF() |
| 772 | ENDIF() |