1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00
libcpuid/tests/CMakeLists.txt

31 lines
1 KiB
Text
Raw Normal View History

2020-05-22 20:06:34 +00:00
if(UNIX)
add_executable(convert_instlatx64 convert_instlatx64.c)
target_link_libraries(convert_instlatx64 PUBLIC cpuid)
endif(UNIX)
2020-05-21 16:43:34 +00:00
add_custom_target(test DEPENDS test-fast)
add_custom_target(
test-fast
COMMAND ${CMAKE_COMMAND} -E env "LD_LD_PRELOAD=${CMAKE_BINARY_DIR}/libcpuid" ./run_tests.py
"${CMAKE_BINARY_DIR}/cpuid_tool/cpuid_tool" "." --show-test-fast-warning
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
COMMENT "Run tests (fast mode)"
VERBATIM)
add_custom_target(
test-old
COMMAND ${CMAKE_COMMAND} -E env "LD_LD_PRELOAD=${CMAKE_BINARY_DIR}/libcpuid" ./run_tests.py
"${CMAKE_BINARY_DIR}/cpuid_tool/cpuid_tool" "."
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
COMMENT "Run tests (old mode)"
VERBATIM)
add_custom_target(
fix-tests
COMMAND ${CMAKE_COMMAND} -E env "LD_LD_PRELOAD=${CMAKE_BINARY_DIR}/libcpuid" ./run_tests.py
"${CMAKE_BINARY_DIR}/cpuid_tool/cpuid_tool" "." --fix
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
COMMENT "Fix tests"
VERBATIM)