aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-12-11 09:30:07 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-12-11 09:45:04 -0500
commit4fd92ec6b203d6b94b9e9f9531fd60a65736e810 (patch)
tree2b5be989ca839bd97f55f40605e23d7019397be7
parent1bec4776252cec88ec3336602c0c477c20a1292f (diff)
downloadstasis-4fd92ec6b203d6b94b9e9f9531fd60a65736e810.tar.gz
Restructure projectdelivery-lib
* Move headers to relevant include directories within the target tree(s) * Adjust doxygen configuration to search correct paths * Adjust CMake configuration to use new include paths
-rw-r--r--CMakeLists.txt7
-rw-r--r--docs/Doxyfile4
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/cli/stasis/CMakeLists.txt6
-rw-r--r--src/cli/stasis/include/args.h (renamed from src/cli/stasis/args.h)0
-rw-r--r--src/cli/stasis/include/callbacks.h (renamed from src/cli/stasis/callbacks.h)0
-rw-r--r--src/cli/stasis/include/system_requirements.h (renamed from src/cli/stasis/system_requirements.h)0
-rw-r--r--src/cli/stasis/include/tpl.h (renamed from src/cli/stasis/tpl.h)0
-rw-r--r--src/cli/stasis_indexer/CMakeLists.txt8
-rw-r--r--src/cli/stasis_indexer/include/args.h (renamed from src/cli/stasis_indexer/args.h)0
-rw-r--r--src/cli/stasis_indexer/include/callbacks.h (renamed from src/cli/stasis_indexer/callbacks.h)0
-rw-r--r--src/cli/stasis_indexer/include/helpers.h (renamed from src/cli/stasis_indexer/helpers.h)0
-rw-r--r--src/cli/stasis_indexer/include/junitxml_report.h (renamed from src/cli/stasis_indexer/junitxml_report.h)0
-rw-r--r--src/cli/stasis_indexer/include/readmes.h (renamed from src/cli/stasis_indexer/readmes.h)0
-rw-r--r--src/cli/stasis_indexer/include/website.h (renamed from src/cli/stasis_indexer/website.h)0
-rw-r--r--src/lib/core/CMakeLists.txt8
-rw-r--r--src/lib/core/include/artifactory.h (renamed from include/artifactory.h)0
-rw-r--r--src/lib/core/include/conda.h (renamed from include/conda.h)0
-rw-r--r--src/lib/core/include/copy.h (renamed from include/copy.h)0
-rw-r--r--src/lib/core/include/core.h (renamed from include/core.h)0
-rw-r--r--src/lib/core/include/core_mem.h (renamed from include/core_mem.h)0
-rw-r--r--src/lib/core/include/docker.h (renamed from include/docker.h)0
-rw-r--r--src/lib/core/include/download.h (renamed from include/download.h)0
-rw-r--r--src/lib/core/include/envctl.h (renamed from include/envctl.h)0
-rw-r--r--src/lib/core/include/environment.h (renamed from include/environment.h)0
-rw-r--r--src/lib/core/include/github.h (renamed from include/github.h)0
-rw-r--r--src/lib/core/include/ini.h (renamed from include/ini.h)0
-rw-r--r--src/lib/core/include/junitxml.h (renamed from include/junitxml.h)0
-rw-r--r--src/lib/core/include/multiprocessing.h (renamed from include/multiprocessing.h)0
-rw-r--r--src/lib/core/include/os_darwin.h (renamed from include/os_darwin.h)0
-rw-r--r--src/lib/core/include/os_linux.h (renamed from include/os_linux.h)0
-rw-r--r--src/lib/core/include/package.h (renamed from include/package.h)0
-rw-r--r--src/lib/core/include/recipe.h (renamed from include/recipe.h)0
-rw-r--r--src/lib/core/include/relocation.h (renamed from include/relocation.h)0
-rw-r--r--src/lib/core/include/rules.h (renamed from include/rules.h)0
-rw-r--r--src/lib/core/include/str.h (renamed from include/str.h)0
-rw-r--r--src/lib/core/include/strlist.h (renamed from include/strlist.h)0
-rw-r--r--src/lib/core/include/system.h (renamed from include/system.h)0
-rw-r--r--src/lib/core/include/template.h (renamed from include/template.h)0
-rw-r--r--src/lib/core/include/template_func_proto.h (renamed from include/template_func_proto.h)0
-rw-r--r--src/lib/core/include/utils.h (renamed from include/utils.h)0
-rw-r--r--src/lib/core/include/wheel.h (renamed from include/wheel.h)0
-rw-r--r--src/lib/delivery/CMakeLists.txt7
-rw-r--r--src/lib/delivery/include/delivery.h (renamed from include/delivery.h)10
-rw-r--r--tests/CMakeLists.txt11
-rw-r--r--tests/include/testing.h (renamed from tests/testing.h)0
46 files changed, 37 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6558205..d21a553 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,11 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
add_compile_options(${win_cflags})
endif()
+set(core_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/core/include)
+set(delivery_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/delivery/include)
+set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}")
+configure_file(${PROJECT_SOURCE_DIR}/include/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h @ONLY)
+include_directories(${PROJECT_BINARY_DIR}/include)
add_subdirectory(src)
# Toggle extremely verbose output
@@ -52,8 +57,6 @@ else()
message(CHECK_PASS "no")
endif()
-set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}")
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h @ONLY)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/stasis_pandoc.css DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/stasis)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/stasis.ini DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/stasis)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/mission DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/stasis)
diff --git a/docs/Doxyfile b/docs/Doxyfile
index 3964a1e..096c62c 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -124,7 +124,7 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = devel.md ../README.md ../src ../include
+INPUT = devel.md ../README.md ../src/lib
INPUT_ENCODING = UTF-8
INPUT_FILE_ENCODING =
FILE_PATTERNS = *.c \
@@ -177,7 +177,7 @@ FILE_PATTERNS = *.c \
*.ucf \
*.qsf \
*.ice
-RECURSIVE = NO
+RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bfee276..2e7d87a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,7 +1,3 @@
-include_directories(${CMAKE_BINARY_DIR}/include)
-include_directories(${CMAKE_SOURCE_DIR}/include)
-include_directories(${PROJECT_BINARY_DIR})
-
add_subdirectory(lib)
add_subdirectory(cli)
diff --git a/src/cli/stasis/CMakeLists.txt b/src/cli/stasis/CMakeLists.txt
index da63d57..1996c4c 100644
--- a/src/cli/stasis/CMakeLists.txt
+++ b/src/cli/stasis/CMakeLists.txt
@@ -1,4 +1,3 @@
-include_directories(${CMAKE_SOURCE_DIR})
add_executable(stasis
stasis_main.c
args.c
@@ -10,6 +9,11 @@ target_link_libraries(stasis PRIVATE
stasis_core
stasis_delivery
)
+target_include_directories(stasis PRIVATE
+ ${core_INCLUDE}
+ ${delivery_INCLUDE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
target_link_libraries(stasis PUBLIC LibXml2::LibXml2)
install(TARGETS stasis RUNTIME)
diff --git a/src/cli/stasis/args.h b/src/cli/stasis/include/args.h
index 5bad752..5bad752 100644
--- a/src/cli/stasis/args.h
+++ b/src/cli/stasis/include/args.h
diff --git a/src/cli/stasis/callbacks.h b/src/cli/stasis/include/callbacks.h
index 369ce56..369ce56 100644
--- a/src/cli/stasis/callbacks.h
+++ b/src/cli/stasis/include/callbacks.h
diff --git a/src/cli/stasis/system_requirements.h b/src/cli/stasis/include/system_requirements.h
index ddc2705..ddc2705 100644
--- a/src/cli/stasis/system_requirements.h
+++ b/src/cli/stasis/include/system_requirements.h
diff --git a/src/cli/stasis/tpl.h b/src/cli/stasis/include/tpl.h
index 398f0fe..398f0fe 100644
--- a/src/cli/stasis/tpl.h
+++ b/src/cli/stasis/include/tpl.h
diff --git a/src/cli/stasis_indexer/CMakeLists.txt b/src/cli/stasis_indexer/CMakeLists.txt
index b100925..8c00ce4 100644
--- a/src/cli/stasis_indexer/CMakeLists.txt
+++ b/src/cli/stasis_indexer/CMakeLists.txt
@@ -5,11 +5,13 @@ add_executable(stasis_indexer
helpers.c
junitxml_report.c
website.c
- website.h
readmes.c
- readmes.h
)
-target_include_directories(stasis_indexer PRIVATE ${CMAKE_SOURCE_DIR})
+target_include_directories(stasis_indexer PRIVATE
+ ${core_INCLUDE}
+ ${delivery_INCLUDE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
target_link_libraries(stasis_indexer PRIVATE
stasis_core
stasis_delivery
diff --git a/src/cli/stasis_indexer/args.h b/src/cli/stasis_indexer/include/args.h
index 543aa4b..543aa4b 100644
--- a/src/cli/stasis_indexer/args.h
+++ b/src/cli/stasis_indexer/include/args.h
diff --git a/src/cli/stasis_indexer/callbacks.h b/src/cli/stasis_indexer/include/callbacks.h
index 7d95cbb..7d95cbb 100644
--- a/src/cli/stasis_indexer/callbacks.h
+++ b/src/cli/stasis_indexer/include/callbacks.h
diff --git a/src/cli/stasis_indexer/helpers.h b/src/cli/stasis_indexer/include/helpers.h
index d493f75..d493f75 100644
--- a/src/cli/stasis_indexer/helpers.h
+++ b/src/cli/stasis_indexer/include/helpers.h
diff --git a/src/cli/stasis_indexer/junitxml_report.h b/src/cli/stasis_indexer/include/junitxml_report.h
index 6d2a248..6d2a248 100644
--- a/src/cli/stasis_indexer/junitxml_report.h
+++ b/src/cli/stasis_indexer/include/junitxml_report.h
diff --git a/src/cli/stasis_indexer/readmes.h b/src/cli/stasis_indexer/include/readmes.h
index d4fa7ac..d4fa7ac 100644
--- a/src/cli/stasis_indexer/readmes.h
+++ b/src/cli/stasis_indexer/include/readmes.h
diff --git a/src/cli/stasis_indexer/website.h b/src/cli/stasis_indexer/include/website.h
index e67d58b..e67d58b 100644
--- a/src/cli/stasis_indexer/website.h
+++ b/src/cli/stasis_indexer/include/website.h
diff --git a/src/lib/core/CMakeLists.txt b/src/lib/core/CMakeLists.txt
index 522f20f..e3e3d4b 100644
--- a/src/lib/core/CMakeLists.txt
+++ b/src/lib/core/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(${PROJECT_BINARY_DIR})
-
add_library(stasis_core STATIC
globals.c
str.c
@@ -24,4 +22,8 @@ add_library(stasis_core STATIC
envctl.c
multiprocessing.c
)
-
+target_include_directories(stasis_core PRIVATE
+ ${core_INCLUDE}
+ ${delivery_INCLUDE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
diff --git a/include/artifactory.h b/src/lib/core/include/artifactory.h
index e580886..e580886 100644
--- a/include/artifactory.h
+++ b/src/lib/core/include/artifactory.h
diff --git a/include/conda.h b/src/lib/core/include/conda.h
index b8d0caa..b8d0caa 100644
--- a/include/conda.h
+++ b/src/lib/core/include/conda.h
diff --git a/include/copy.h b/src/lib/core/include/copy.h
index 0f92ddd..0f92ddd 100644
--- a/include/copy.h
+++ b/src/lib/core/include/copy.h
diff --git a/include/core.h b/src/lib/core/include/core.h
index 362ac8d..362ac8d 100644
--- a/include/core.h
+++ b/src/lib/core/include/core.h
diff --git a/include/core_mem.h b/src/lib/core/include/core_mem.h
index bd50e9d..bd50e9d 100644
--- a/include/core_mem.h
+++ b/src/lib/core/include/core_mem.h
diff --git a/include/docker.h b/src/lib/core/include/docker.h
index 7585d86..7585d86 100644
--- a/include/docker.h
+++ b/src/lib/core/include/docker.h
diff --git a/include/download.h b/src/lib/core/include/download.h
index 0b6311e..0b6311e 100644
--- a/include/download.h
+++ b/src/lib/core/include/download.h
diff --git a/include/envctl.h b/src/lib/core/include/envctl.h
index 659cae3..659cae3 100644
--- a/include/envctl.h
+++ b/src/lib/core/include/envctl.h
diff --git a/include/environment.h b/src/lib/core/include/environment.h
index 34bc600..34bc600 100644
--- a/include/environment.h
+++ b/src/lib/core/include/environment.h
diff --git a/include/github.h b/src/lib/core/include/github.h
index f9b47a3..f9b47a3 100644
--- a/include/github.h
+++ b/src/lib/core/include/github.h
diff --git a/include/ini.h b/src/lib/core/include/ini.h
index 557f157..557f157 100644
--- a/include/ini.h
+++ b/src/lib/core/include/ini.h
diff --git a/include/junitxml.h b/src/lib/core/include/junitxml.h
index 777ee27..777ee27 100644
--- a/include/junitxml.h
+++ b/src/lib/core/include/junitxml.h
diff --git a/include/multiprocessing.h b/src/lib/core/include/multiprocessing.h
index ec7c1ad..ec7c1ad 100644
--- a/include/multiprocessing.h
+++ b/src/lib/core/include/multiprocessing.h
diff --git a/include/os_darwin.h b/src/lib/core/include/os_darwin.h
index e8513ff..e8513ff 100644
--- a/include/os_darwin.h
+++ b/src/lib/core/include/os_darwin.h
diff --git a/include/os_linux.h b/src/lib/core/include/os_linux.h
index d418090..d418090 100644
--- a/include/os_linux.h
+++ b/src/lib/core/include/os_linux.h
diff --git a/include/package.h b/src/lib/core/include/package.h
index eff1874..eff1874 100644
--- a/include/package.h
+++ b/src/lib/core/include/package.h
diff --git a/include/recipe.h b/src/lib/core/include/recipe.h
index 4dea248..4dea248 100644
--- a/include/recipe.h
+++ b/src/lib/core/include/recipe.h
diff --git a/include/relocation.h b/src/lib/core/include/relocation.h
index 9a1f0f4..9a1f0f4 100644
--- a/include/relocation.h
+++ b/src/lib/core/include/relocation.h
diff --git a/include/rules.h b/src/lib/core/include/rules.h
index 666d331..666d331 100644
--- a/include/rules.h
+++ b/src/lib/core/include/rules.h
diff --git a/include/str.h b/src/lib/core/include/str.h
index bb96db0..bb96db0 100644
--- a/include/str.h
+++ b/src/lib/core/include/str.h
diff --git a/include/strlist.h b/src/lib/core/include/strlist.h
index cdbfc01..cdbfc01 100644
--- a/include/strlist.h
+++ b/src/lib/core/include/strlist.h
diff --git a/include/system.h b/src/lib/core/include/system.h
index 7019b92..7019b92 100644
--- a/include/system.h
+++ b/src/lib/core/include/system.h
diff --git a/include/template.h b/src/lib/core/include/template.h
index e3d83fb..e3d83fb 100644
--- a/include/template.h
+++ b/src/lib/core/include/template.h
diff --git a/include/template_func_proto.h b/src/lib/core/include/template_func_proto.h
index 286ccfb..286ccfb 100644
--- a/include/template_func_proto.h
+++ b/src/lib/core/include/template_func_proto.h
diff --git a/include/utils.h b/src/lib/core/include/utils.h
index 87f28cc..87f28cc 100644
--- a/include/utils.h
+++ b/src/lib/core/include/utils.h
diff --git a/include/wheel.h b/src/lib/core/include/wheel.h
index 1a689e9..1a689e9 100644
--- a/include/wheel.h
+++ b/src/lib/core/include/wheel.h
diff --git a/src/lib/delivery/CMakeLists.txt b/src/lib/delivery/CMakeLists.txt
index 19e2c80..78ed20f 100644
--- a/src/lib/delivery/CMakeLists.txt
+++ b/src/lib/delivery/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(${PROJECT_BINARY_DIR})
-
add_library(stasis_delivery STATIC
delivery_postprocess.c
delivery_conda.c
@@ -13,4 +11,9 @@ add_library(stasis_delivery STATIC
delivery_init.c
delivery.c
)
+target_include_directories(stasis_delivery PRIVATE
+ ${core_INCLUDE}
+ ${delivery_INCLUDE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+)
target_link_libraries(stasis_delivery stasis_core) \ No newline at end of file
diff --git a/include/delivery.h b/src/lib/delivery/include/delivery.h
index 40ca3e6..a3843f5 100644
--- a/include/delivery.h
+++ b/src/lib/delivery/include/delivery.h
@@ -9,16 +9,16 @@
#include <sys/utsname.h>
#include <fnmatch.h>
#include <sys/statvfs.h>
-#include "core.h"
+#include "artifactory.h"
+#include "conda.h"
#include "copy.h"
+#include "core.h"
+#include "docker.h"
#include "environment.h"
-#include "conda.h"
#include "ini.h"
-#include "artifactory.h"
-#include "docker.h"
-#include "wheel.h"
#include "multiprocessing.h"
#include "recipe.h"
+#include "wheel.h"
#define DELIVERY_PLATFORM_MAX 4
#define DELIVERY_PLATFORM_MAXLEN 65
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2564d03..07ba39c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,7 +1,3 @@
-include_directories(
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_BINARY_DIR}/include
-)
find_program(BASH_PROGRAM bash)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/tests)
set(CTEST_BINARY_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
@@ -22,8 +18,6 @@ if (BASH_PROGRAM AND BUILD_TESTING_RT)
string(REGEX REPLACE ${ext_pattern} "" rt_name ${rt_file})
add_test (${rt_name} ${BASH_PROGRAM} ${rt_file})
endforeach()
- add_test (rt_generic_based_on ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/rt_generic_based_on.sh)
- add_test (rt_generic ${BASH_PROGRAM} ${CMAKE_CURRENT_SOURCE_DIR}/rt_generic.sh)
endif()
foreach(source_file ${source_files})
@@ -36,6 +30,11 @@ foreach(source_file ${source_files})
elseif (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${test_executable} PRIVATE ${win_cflags} ${win_msvc_cflags})
endif()
+ target_include_directories(${test_executable} PRIVATE
+ ${core_INCLUDE}
+ ${delivery_INCLUDE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ )
target_link_libraries(${test_executable} PRIVATE
stasis_core
stasis_delivery
diff --git a/tests/testing.h b/tests/include/testing.h
index 4c97bf2..4c97bf2 100644
--- a/tests/testing.h
+++ b/tests/include/testing.h