From 502cc0afcb6836fe54c1da7227b1e5caf705bbe6 Mon Sep 17 00:00:00 2001 From: ToKiNoBug Date: Thu, 26 Oct 2023 12:57:04 +0800 Subject: [PATCH 1/4] ignore CLion files Signed-off-by: ToKiNoBug --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 9dc07073..286544f3 100644 --- a/.gitignore +++ b/.gitignore @@ -173,6 +173,9 @@ compile_commands.json .clangd/ .cache/ +# CLion/IDEA files +.idea/ + # Project files bin/ external/boost/ From 01bb458967a534ed63e60200c5071358665ff072 Mon Sep 17 00:00:00 2001 From: ToKiNoBug Date: Thu, 26 Oct 2023 12:57:25 +0800 Subject: [PATCH 2/4] generate missing komputeConfigVersion.cmake to fix issue #324 Signed-off-by: ToKiNoBug --- src/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dbb47dbe..b38e30d6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,6 +43,14 @@ configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/komputeConfig.cmake.in "${PROJECT_BINARY_DIR}/kompute/komputeConfig.cmake" INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/kompute) +# Generated komputeConfigVersion.cmake that is required in the following install command +# This will fix issue #324 +write_basic_package_version_file( + "${PROJECT_BINARY_DIR}/kompute/komputeConfigVersion.cmake" + VERSION ${CMAKE_PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion # Other possible values: SameMajorVersion, SameMinorVersion, ExactVersion +) + install(FILES ${PROJECT_BINARY_DIR}/kompute/komputeConfig.cmake ${PROJECT_BINARY_DIR}/kompute/komputeConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/kompute) From 069527a4704e401d1d2fdf3a43dfc508072cb7d8 Mon Sep 17 00:00:00 2001 From: ToKiNoBug Date: Thu, 26 Oct 2023 12:58:22 +0800 Subject: [PATCH 3/4] fix installing kompute logger header files Signed-off-by: ToKiNoBug --- src/include/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt index e1652fdd..e8aea8bf 100644 --- a/src/include/CMakeLists.txt +++ b/src/include/CMakeLists.txt @@ -41,4 +41,7 @@ target_sources(kp_logger PRIVATE kompute/logger/Logger.hpp ) -install(DIRECTORY logger DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) \ No newline at end of file +# This installation requires non-existing dir logger, +# but previous installation at line 30 has already installed kompute/logger +# This will cause an error during installation +# install(DIRECTORY logger DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) \ No newline at end of file From 8be254440118a3e912afb7f72e2a8ce734d2cb75 Mon Sep 17 00:00:00 2001 From: ToKiNoBug Date: Thu, 26 Oct 2023 13:04:45 +0800 Subject: [PATCH 4/4] Change compatibility of cmake pack to SameMajorVersion Signed-off-by: ToKiNoBug --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b38e30d6..79d43cc1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -48,7 +48,7 @@ configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/komputeConfig.cmake.in write_basic_package_version_file( "${PROJECT_BINARY_DIR}/kompute/komputeConfigVersion.cmake" VERSION ${CMAKE_PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion # Other possible values: SameMajorVersion, SameMinorVersion, ExactVersion + COMPATIBILITY SameMajorVersion# All possible values: SameMajorVersion, SameMinorVersion, ExactVersion, AnyNewerVersion ) install(FILES ${PROJECT_BINARY_DIR}/kompute/komputeConfig.cmake