mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
CMake: fix Unix install and format
This commit is contained in:
parent
f49e82043c
commit
7179a7b103
4 changed files with 135 additions and 68 deletions
28
tests/CMakeLists.txt
Normal file
28
tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
add_executable(convert_instlatx64 convert_instlatx64.c)
|
||||
target_link_libraries(convert_instlatx64 PUBLIC cpuid)
|
||||
|
||||
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)
|
Loading…
Add table
Add a link
Reference in a new issue