diff --git a/CMakeLists.txt b/CMakeLists.txt index 0259d39a93..ea612178f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -751,11 +751,6 @@ if(BUILD_SHARED_LIBS) ) endif() -set(TESTS_INTEGRATION_DIR ${PROJECT_SOURCE_DIR}/tests/integration) -add_subdirectory(${TESTS_INTEGRATION_DIR}) -set(TESTS_UNIT_DIR ${PROJECT_SOURCE_DIR}/tests/unit) -add_subdirectory(${TESTS_UNIT_DIR}) - # Fuzzer if this is moved to it's own CMakeLists.txt (as it should be) # the OSS fuzzer build fails. And must be fixed. # Simply because it builds the fuzzer there again with hard-coded paths. @@ -881,6 +876,12 @@ if(CAPSTONE_BUILD_CSTEST) set(CSTEST_DIR ${PROJECT_SOURCE_DIR}/suite/cstest) add_subdirectory(${CSTEST_DIR}) + # Integration and unit tests + set(TESTS_INTEGRATION_DIR ${PROJECT_SOURCE_DIR}/tests/integration) + add_subdirectory(${TESTS_INTEGRATION_DIR}) + set(TESTS_UNIT_DIR ${PROJECT_SOURCE_DIR}/tests/unit) + add_subdirectory(${TESTS_UNIT_DIR}) + # Unit tests for auto-sync set(AUTO_SYNC_C_TEST_DIR ${PROJECT_SOURCE_DIR}/suite/auto-sync/c_tests/) add_subdirectory(${AUTO_SYNC_C_TEST_DIR}) diff --git a/suite/auto-sync/c_tests/CMakeLists.txt b/suite/auto-sync/c_tests/CMakeLists.txt index f90f24b28b..ae54d3101a 100644 --- a/suite/auto-sync/c_tests/CMakeLists.txt +++ b/suite/auto-sync/c_tests/CMakeLists.txt @@ -7,8 +7,8 @@ include_directories(${AUTO_SYNC_C_TEST_INC_DIR} ${PROJECT_SOURCE_DIR}/include) file(GLOB AUTO_SYNC_C_SRC ${AUTO_SYNC_C_TEST_SRC_DIR}/*.c) add_executable(compat_header_build_test ${AUTO_SYNC_C_SRC}) -add_dependencies(compat_header_build_test libcstest) -target_link_libraries(compat_header_build_test PUBLIC libcstest) +add_dependencies(compat_header_build_test capstone) +target_link_libraries(compat_header_build_test PUBLIC capstone) add_test(NAME ASCompatibilityHeaderTest COMMAND compat_header_build_test