From 634b273f205c12ca34be7e47e7d83c45cce9a0fa Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Thu, 21 Mar 2024 17:08:46 +0300 Subject: [PATCH] fix: dependencies for tests --- CMakeLists.txt | 11 ++++++----- .../cxx/identifiersModule/CMakeLists.txt | 2 +- .../cxx/identifiersModule/test/tests.cmake | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 315dff93..0a2b320d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,7 @@ link_directories(${SC_BIN_PATH} ${SC_EXTENSIONS_DIRECTORY}) set(SC_MACHINE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/ostis-web-platform/sc-machine") set(SC_CODEGEN_TOOL "${SC_BIN_PATH}/sc-code-generator") set(CMAKE_MODULE_PATH "${SC_MACHINE_PATH}/cmake") -include("${SC_MACHINE_PATH}/cmake/codegen.cmake") - -if(${SC_BUILD_TESTS}) - include(${CMAKE_MODULE_PATH}/tests.cmake) -endif() +include("${CMAKE_MODULE_PATH}/codegen.cmake") set(SC_MEMORY_SRC "${SC_MACHINE_PATH}/sc-memory/") set(SC_KPM_SRC "${SC_MACHINE_PATH}/sc-kpm/") @@ -37,4 +33,9 @@ foreach(OUTPUT_CONFIG ${CMAKE_CONFIGURATION_TYPES}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${SC_BIN_PATH}) endforeach(OUTPUT_CONFIG) +if(${SC_BUILD_TESTS}) + include(${CMAKE_MODULE_PATH}/tests.cmake) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty) +endif() + add_subdirectory(platform-dependent-components/problem-solver) diff --git a/platform-dependent-components/problem-solver/cxx/identifiersModule/CMakeLists.txt b/platform-dependent-components/problem-solver/cxx/identifiersModule/CMakeLists.txt index c9410a95..263b66b0 100755 --- a/platform-dependent-components/problem-solver/cxx/identifiersModule/CMakeLists.txt +++ b/platform-dependent-components/problem-solver/cxx/identifiersModule/CMakeLists.txt @@ -16,7 +16,7 @@ include_directories( ) add_library(identifiers SHARED ${SOURCES}) -target_link_libraries(identifiers sc-memory sc-agents-common) +target_link_libraries(identifiers sc-core sc-memory sc-agents-common) sc_codegen_ex(identifiers ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/generated) diff --git a/platform-dependent-components/problem-solver/cxx/identifiersModule/test/tests.cmake b/platform-dependent-components/problem-solver/cxx/identifiersModule/test/tests.cmake index ac86ed36..0d518cd7 100644 --- a/platform-dependent-components/problem-solver/cxx/identifiersModule/test/tests.cmake +++ b/platform-dependent-components/problem-solver/cxx/identifiersModule/test/tests.cmake @@ -1,7 +1,7 @@ make_tests_from_folder(${CMAKE_CURRENT_LIST_DIR}/units NAME identifiers_module_test_starter DEPENDS sc-agents-common identifiers sc-builder-lib - INCLUDES ${SC_MEMORY_SRC}/tests/sc-memory/_test ${CMAKE_CURRENT_LIST_DIR}/.. ${SC_MACHINE_ROOT}/sc-tools/sc-builder/src ${SC_MEMORY_SRC}/sc-memory + INCLUDES ${SC_MEMORY_SRC}/tests/sc-memory/_test ${CMAKE_CURRENT_LIST_DIR}/.. ${SC_TOOLS_SRC}/sc-builder/src ${SC_MEMORY_SRC}/sc-memory ) add_definitions(-DMODULE_TEST_SRC_PATH="${CMAKE_CURRENT_LIST_DIR}")