-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4278 from neobrain/refactor_reduce_vixl_options
CMake: Simplify vixl-related options
- Loading branch information
Showing
3 changed files
with
18 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
if (COMPILE_VIXL_DISASSEMBLER) | ||
file(GLOB_RECURSE TESTS CONFIGURE_DEPENDS *.cpp) | ||
file(GLOB_RECURSE TESTS CONFIGURE_DEPENDS *.cpp) | ||
|
||
set (LIBS fmt::fmt vixl Catch2::Catch2WithMain FEXCore_Base JemallocLibs) | ||
foreach(TEST ${TESTS}) | ||
get_filename_component(TEST_NAME ${TEST} NAME_WLE) | ||
add_executable(Emitter_${TEST_NAME} ${TEST}) | ||
target_link_libraries(Emitter_${TEST_NAME} PRIVATE ${LIBS}) | ||
target_include_directories(Emitter_${TEST_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../Source/") | ||
set_target_properties(Emitter_${TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/EmitterTests") | ||
catch_discover_tests(Emitter_${TEST_NAME} TEST_SUFFIX ".${TEST_NAME}.Emitter") | ||
endforeach() | ||
set (LIBS fmt::fmt vixl Catch2::Catch2WithMain FEXCore_Base JemallocLibs) | ||
foreach(TEST ${TESTS}) | ||
get_filename_component(TEST_NAME ${TEST} NAME_WLE) | ||
add_executable(Emitter_${TEST_NAME} ${TEST}) | ||
target_link_libraries(Emitter_${TEST_NAME} PRIVATE ${LIBS}) | ||
target_include_directories(Emitter_${TEST_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../Source/") | ||
set_target_properties(Emitter_${TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/EmitterTests") | ||
catch_discover_tests(Emitter_${TEST_NAME} TEST_SUFFIX ".${TEST_NAME}.Emitter") | ||
endforeach() | ||
|
||
add_custom_target( | ||
emitter_tests | ||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/" | ||
USES_TERMINAL | ||
COMMAND "ctest" "--output-on-failure" "--timeout" "302" ${TEST_JOB_FLAG} "-R" "\.*.Emitter$$") | ||
else() | ||
message(AUTHOR_WARNING "Tests are enabled but vixl disassembler is not. Emitter tests won't be built.") | ||
endif() | ||
add_custom_target( | ||
emitter_tests | ||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/" | ||
USES_TERMINAL | ||
COMMAND "ctest" "--output-on-failure" "--timeout" "302" ${TEST_JOB_FLAG} "-R" "\.*.Emitter$$") |