diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2025-12-23 11:59:45 +0100 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-01-07 10:00:06 +0100 |
| commit | 48c294105f5123dc876fbad199ec1e0166d82a18 (patch) | |
| tree | c49ce8ac75a7d63c10ea1ff960eeff750c680a8e /src/irmd/reg | |
| parent | 145be13e8c18fcb39476d8f65fed23d82320f22f (diff) | |
| download | ouroboros-be.tar.gz ouroboros-be.zip | |
build: Refactor CMake modulesbe
This moves the CMake build logic out of the source tree and splits it
up into a more modular form. The tests now have a CMakeLists.txt file
in their respective source directory.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/reg')
| -rw-r--r-- | src/irmd/reg/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | src/irmd/reg/tests/CMakeLists.txt | 10 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/irmd/reg/CMakeLists.txt b/src/irmd/reg/CMakeLists.txt deleted file mode 100644 index d3844908..00000000 --- a/src/irmd/reg/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -include_directories(${CMAKE_SOURCE_DIR}/include) -include_directories(${CMAKE_BINARY_DIR}/include) - -if(BUILD_TESTS) - add_subdirectory(tests) -endif () diff --git a/src/irmd/reg/tests/CMakeLists.txt b/src/irmd/reg/tests/CMakeLists.txt index d2907a93..eb7a1765 100644 --- a/src/irmd/reg/tests/CMakeLists.txt +++ b/src/irmd/reg/tests/CMakeLists.txt @@ -1,6 +1,14 @@ get_filename_component(tmp ".." ABSOLUTE) get_filename_component(src_folder "${tmp}" NAME) +# Set include directories for tests +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/include) +include_directories(${CMAKE_BINARY_DIR}/include) +include_directories(${CMAKE_SOURCE_DIR}/src/irmd) +include_directories(${CMAKE_BINARY_DIR}/src/irmd) + create_test_sourcelist(${src_folder}_tests test_suite.c # Add new tests here flow_test.c @@ -29,5 +37,5 @@ endif() foreach(test ${tests_to_run}) get_filename_component(test_name ${test} NAME_WE) - add_test(irmd/reg/${test_name} ${C_TEST_PATH}/${src_folder}_test ${test_name}) + add_test(irmd/reg/${test_name} ${CMAKE_CURRENT_BINARY_DIR}/${src_folder}_test ${test_name}) endforeach(test) |
