diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f2fc89c..9a8ca3db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,9 +111,8 @@ else() endif() include_directories(${Boost_INCLUDE_DIRS}) -# Include Catch -include_directories(externals/catch) -enable_testing(true) # Enables unit-testing. +# Enable unit-testing. +enable_testing(true) # Include LLVM if (DYNARMIC_USE_LLVM) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index a8333a4c..73a1a6f0 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -13,3 +13,7 @@ if (NOT TARGET xbyak) target_include_directories(xbyak INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/xbyak/xbyak) endif() endif() + +add_library(catch INTERFACE) +target_include_directories(catch INTERFACE + $) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 05432c19..84b93fb2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,7 +35,7 @@ include(CreateDirectoryGroups) create_directory_groups(${SRCS} ${HEADERS}) add_executable(dynarmic_tests ${SRCS}) -target_link_libraries(dynarmic_tests dynarmic ${llvm_libs}) +target_link_libraries(dynarmic_tests dynarmic catch ${llvm_libs}) set_target_properties(dynarmic_tests PROPERTIES LINKER_LANGUAGE CXX) target_include_directories(dynarmic_tests PRIVATE . ../src) target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})