From 082447a75c2f2140aa91e3776a031a914ab8f387 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Wed, 23 Oct 2024 13:47:21 +0200 Subject: [PATCH] [INFRA] Rename build_system to cmake --- .github/workflows/cron_latest_libraries.yml | 2 +- CMakeLists.txt | 2 +- {build_system => cmake}/CPM.cmake | 0 {build_system => cmake}/cpack_install.cmake.in | 2 +- {build_system => cmake}/package-lock.cmake | 0 {build_system => cmake}/seqan3-config-version.cmake | 2 +- {build_system => cmake}/seqan3-config.cmake | 0 {build_system => cmake}/seqan3-install.cmake | 3 +-- {build_system => cmake}/seqan3-package.cmake | 8 ++++---- test/api_stability/CMakeLists.txt | 3 ++- test/api_stability/README.md | 2 +- test/documentation/CMakeLists.txt | 8 ++++---- test/external_project/CMakeLists.txt | 4 ++-- .../external_project/seqan3_setup_tutorial/CMakeLists.txt | 2 +- .../seqan3_setup_tutorial_with_sharg/CMakeLists.txt | 2 +- .../seqan3_submodule_find_package/CMakeLists.txt | 2 +- test/seqan3-test.cmake | 4 ++-- 17 files changed, 23 insertions(+), 23 deletions(-) rename {build_system => cmake}/CPM.cmake (100%) rename {build_system => cmake}/cpack_install.cmake.in (95%) rename {build_system => cmake}/package-lock.cmake (100%) rename {build_system => cmake}/seqan3-config-version.cmake (98%) rename {build_system => cmake}/seqan3-config.cmake (100%) rename {build_system => cmake}/seqan3-install.cmake (88%) rename {build_system => cmake}/seqan3-package.cmake (84%) diff --git a/.github/workflows/cron_latest_libraries.yml b/.github/workflows/cron_latest_libraries.yml index 795991890a..fcfaa208f0 100644 --- a/.github/workflows/cron_latest_libraries.yml +++ b/.github/workflows/cron_latest_libraries.yml @@ -45,7 +45,7 @@ jobs: - name: Update dependencies run: | - FILE="build_system/package-lock.cmake" + FILE="cmake/package-lock.cmake" sed -i -E 's@(set \(SEQAN3_\S+_VERSION )[^\)]+\)@\1main)@g' $FILE sed -i -E 's@VERSION( \$\{SEQAN3_\S+_VERSION\})@GIT_TAG\1@g' $FILE sed -i -E 's@SEQAN3_(SDSL|CEREAL)_VERSION main@SEQAN3_\1_VERSION master@g' $FILE diff --git a/CMakeLists.txt b/CMakeLists.txt index c790043002..3a11879c0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ cmake_minimum_required (VERSION 3.5...3.30) -find_path (SEQAN3_MODULE_PATH "seqan3-config.cmake" HINTS "${CMAKE_CURRENT_LIST_DIR}/build_system/") +find_path (SEQAN3_MODULE_PATH "seqan3-config.cmake" HINTS "${CMAKE_CURRENT_LIST_DIR}/cmake/") list (APPEND CMAKE_MODULE_PATH "${SEQAN3_MODULE_PATH}") include (seqan3-config-version) diff --git a/build_system/CPM.cmake b/cmake/CPM.cmake similarity index 100% rename from build_system/CPM.cmake rename to cmake/CPM.cmake diff --git a/build_system/cpack_install.cmake.in b/cmake/cpack_install.cmake.in similarity index 95% rename from build_system/cpack_install.cmake.in rename to cmake/cpack_install.cmake.in index 5cefefde1b..6c2f79b8fc 100644 --- a/build_system/cpack_install.cmake.in +++ b/cmake/cpack_install.cmake.in @@ -7,7 +7,7 @@ if (CPACK_SOURCE_INSTALLED_DIRECTORIES) file (COPY "@SEQAN3_SDSL_INCLUDE_DIR@/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/include/seqan3/vendor") file (COPY "@SEQAN3_CEREAL_INCLUDE_DIR@/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/include/seqan3/vendor") - configure_file ("@CPM_DOWNLOAD_LOCATION@" "${CMAKE_CURRENT_BINARY_DIR}/build_system/CPM.cmake" COPYONLY) + configure_file ("@CPM_DOWNLOAD_LOCATION@" "${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake" COPYONLY) if ("@use_ccache_ADDED@" STREQUAL "YES") configure_file ("@use_ccache_SOURCE_DIR@/ccache/CMakeLists.txt" "${CMAKE_CURRENT_BINARY_DIR}/test/cmake/seqan3_require_ccache.cmake" COPYONLY) diff --git a/build_system/package-lock.cmake b/cmake/package-lock.cmake similarity index 100% rename from build_system/package-lock.cmake rename to cmake/package-lock.cmake diff --git a/build_system/seqan3-config-version.cmake b/cmake/seqan3-config-version.cmake similarity index 98% rename from build_system/seqan3-config-version.cmake rename to cmake/seqan3-config-version.cmake index ac6a10f328..f103fd6212 100644 --- a/build_system/seqan3-config-version.cmake +++ b/cmake/seqan3-config-version.cmake @@ -10,7 +10,7 @@ # Note that seqan3-config.cmake can be standalone and thus SEQAN3_CLONE_DIR might be empty. find_path (SEQAN3_CLONE_DIR - NAMES build_system/seqan3-config.cmake + NAMES cmake/seqan3-config.cmake HINTS "${CMAKE_CURRENT_LIST_DIR}/..") find_path (SEQAN3_INCLUDE_DIR NAMES seqan3/version.hpp diff --git a/build_system/seqan3-config.cmake b/cmake/seqan3-config.cmake similarity index 100% rename from build_system/seqan3-config.cmake rename to cmake/seqan3-config.cmake diff --git a/build_system/seqan3-install.cmake b/cmake/seqan3-install.cmake similarity index 88% rename from build_system/seqan3-install.cmake rename to cmake/seqan3-install.cmake index 24781ecaa3..ec9961c094 100644 --- a/build_system/seqan3-install.cmake +++ b/cmake/seqan3-install.cmake @@ -17,8 +17,7 @@ install (FILES "${SEQAN3_CLONE_DIR}/CHANGELOG.md" # TYPE DOC) # install cmake files in /share/cmake -install (FILES "${SEQAN3_CLONE_DIR}/build_system/seqan3-config.cmake" - "${SEQAN3_CLONE_DIR}/build_system/seqan3-config-version.cmake" +install (FILES "${SEQAN3_CLONE_DIR}/cmake/seqan3-config.cmake" "${SEQAN3_CLONE_DIR}/cmake/seqan3-config-version.cmake" DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/seqan3") # install seqan3 header files in /include/seqan3 diff --git a/build_system/seqan3-package.cmake b/cmake/seqan3-package.cmake similarity index 84% rename from build_system/seqan3-package.cmake rename to cmake/seqan3-package.cmake index 31b45cfc1f..1a8ca7d9c7 100644 --- a/build_system/seqan3-package.cmake +++ b/cmake/seqan3-package.cmake @@ -19,19 +19,19 @@ set (CPACK_RESOURCE_FILE_README "${SEQAN3_CLONE_DIR}/README.md") # Already being called on source package, i.e. CPM is already downloaded. if (NOT CPM_DOWNLOAD_LOCATION) - set (CPM_DOWNLOAD_LOCATION "${SEQAN3_CLONE_DIR}/build_system/CPM.cmake") + set (CPM_DOWNLOAD_LOCATION "${SEQAN3_CLONE_DIR}/cmake/CPM.cmake") else () CPMGetPackage (use_ccache) endif () -configure_file ("${SEQAN3_CLONE_DIR}/build_system/cpack_install.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cpack_install.cmake" @ONLY) +configure_file ("${SEQAN3_CLONE_DIR}/cmake/cpack_install.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cpack_install.cmake" + @ONLY) set (CPACK_INSTALL_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/cpack_install.cmake") # Source Package set (CPACK_SOURCE_GENERATOR "TXZ") # Next 2 lines would overwrite copy in cpack_install.cmake -list (APPEND CPACK_SOURCE_IGNORE_FILES "/build_system/CPM.cmake") +list (APPEND CPACK_SOURCE_IGNORE_FILES "/cmake/CPM.cmake") list (APPEND CPACK_SOURCE_IGNORE_FILES "/test/cmake/seqan3_require_ccache.cmake") list (APPEND CPACK_SOURCE_IGNORE_FILES "/\.git($|/)") list (APPEND CPACK_SOURCE_IGNORE_FILES "/\.github/") diff --git a/test/api_stability/CMakeLists.txt b/test/api_stability/CMakeLists.txt index 00d7c53723..d368121135 100644 --- a/test/api_stability/CMakeLists.txt +++ b/test/api_stability/CMakeLists.txt @@ -28,13 +28,14 @@ macro (seqan3_api_stability_test test_suite git_apply) CMAKE_ARGS ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} -DCMAKE_CXX_FLAGS=${SEQAN3_API_STABILITY_CXX_FLAGS} -DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER} - -DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_LIST_DIR}/../../build_system # use current build_system + -DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_LIST_DIR}/../../cmake -DSEQAN3_GENERATE_SNIPPETS=OFF -DSEQAN3_VERBOSE_TESTS=OFF PATCH_COMMAND ${CMAKE_COMMAND} -E echo "" COMMAND ${CMAKE_COMMAND} -E remove_directory "/include" COMMAND ${CMAKE_COMMAND} -E remove_directory "/submodules" COMMAND ${CMAKE_COMMAND} -E remove_directory "/build_system" + COMMAND ${CMAKE_COMMAND} -E remove_directory "/cmake" COMMAND sh -c "${git_apply}" TEST_BEFORE_INSTALL TRUE TEST_COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j diff --git a/test/api_stability/README.md b/test/api_stability/README.md index 2d80649dbe..f28df72e7a 100644 --- a/test/api_stability/README.md +++ b/test/api_stability/README.md @@ -37,7 +37,7 @@ The workflow entails these steps: `/test/api_stability/3.3.0`. * These patches will only apply changes on the tests. * This step is necessary as some of our tests also test non-public / non-stable API. -3. Use the current version of `find_package (SeqAn3)` found in `/build_system`. +3. Use the current version of `find_package (SeqAn3)` found in `/cmake`. 4. Configure the tests `/test/unit` with our current seqan3 header-library (e.g. `/include` and `/submodules/*/include`). * But use the test cases from the LSR. diff --git a/test/documentation/CMakeLists.txt b/test/documentation/CMakeLists.txt index 284e30c3cc..3594bc6211 100644 --- a/test/documentation/CMakeLists.txt +++ b/test/documentation/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 3.7...3.30) ### Find seqan3 -include (../../build_system/seqan3-config-version.cmake) +include (../../cmake/seqan3-config-version.cmake) set (SEQAN3_VERSION "${PACKAGE_VERSION}") # ---------------------------------------------------------------------------- @@ -14,7 +14,7 @@ set (SEQAN3_VERSION "${PACKAGE_VERSION}") # ---------------------------------------------------------------------------- # This will be true for git clones and source packages. -if (EXISTS "${SEQAN3_INCLUDE_DIR}/../build_system/CPM.cmake") +if (EXISTS "${SEQAN3_INCLUDE_DIR}/../cmake/CPM.cmake") set (SEQAN3_HAS_CPM TRUE) else () set (SEQAN3_HAS_CPM FALSE) @@ -22,8 +22,8 @@ endif () if (SEQAN3_HAS_CPM) set (CPM_INDENT " CMake Package Manager CPM: ") - include ("${SEQAN3_INCLUDE_DIR}/../build_system/CPM.cmake") - CPMUsePackageLock ("${SEQAN3_INCLUDE_DIR}/../build_system/package-lock.cmake") + include ("${SEQAN3_INCLUDE_DIR}/../cmake/CPM.cmake") + CPMUsePackageLock ("${SEQAN3_INCLUDE_DIR}/../cmake/package-lock.cmake") endif () project (seqan3 diff --git a/test/external_project/CMakeLists.txt b/test/external_project/CMakeLists.txt index 0792f05864..fd2fc6e5d1 100644 --- a/test/external_project/CMakeLists.txt +++ b/test/external_project/CMakeLists.txt @@ -49,7 +49,7 @@ ExternalProject_Add ( "-DSEQAN3_ROOT=${SEQAN3_ROOT}") # 2) This tests test/external_project/seqan3_submodule_find_package/CMakeLists.txt -# We have a seqan3 checkout somewhere and we point CMAKE_PREFIX_PATH to /seqan3/build_system +# We have a seqan3 checkout somewhere and we point CMAKE_PREFIX_PATH to /seqan3/cmake # and then use `find_package` to find `seqan3-config.cmake` which exposes our `seqan3::seqan3` target. # This is expected to work with CMake >= 3.5. # (ExternalProject_Add simulates a fresh and separate invocation of cmake ../) @@ -59,7 +59,7 @@ ExternalProject_Add ( SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/seqan3_submodule_find_package" CMAKE_ARGS ${SEQAN3_EXTERNAL_PROJECT_CMAKE_ARGS} "-DCMAKE_FIND_DEBUG_MODE=${SEQAN3_EXTERNAL_PROJECT_FIND_DEBUG_MODE}" - "-DCMAKE_PREFIX_PATH=${SEQAN3_ROOT}/build_system") + "-DCMAKE_PREFIX_PATH=${SEQAN3_ROOT}/cmake") # 3) This tests test/external_project/seqan3_installed/CMakeLists.txt # This test assumes that seqan3 was installed by make install (e.g. system-wide). diff --git a/test/external_project/seqan3_setup_tutorial/CMakeLists.txt b/test/external_project/seqan3_setup_tutorial/CMakeLists.txt index e6118a0d00..d2622531d0 100644 --- a/test/external_project/seqan3_setup_tutorial/CMakeLists.txt +++ b/test/external_project/seqan3_setup_tutorial/CMakeLists.txt @@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 3.5...3.30) project (seqan3_tutorial CXX) # add seqan3 to search path -list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../seqan3/build_system") +list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../seqan3/cmake") # require seqan3 with a version between >=3.0.0 and <4.0.0 find_package (seqan3 3.0 REQUIRED) diff --git a/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt b/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt index 55e722a517..ee3380ebb6 100644 --- a/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt +++ b/test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt @@ -20,7 +20,7 @@ cmake_minimum_required (VERSION 3.5...3.30) project (seqan3_tutorial CXX) # add seqan3 to search path -list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../seqan3/build_system") +list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../seqan3/cmake") # add the Sharg Parser to search path list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../sharg-parser/build_system") diff --git a/test/external_project/seqan3_submodule_find_package/CMakeLists.txt b/test/external_project/seqan3_submodule_find_package/CMakeLists.txt index b6644a812a..d6fc35ce7b 100644 --- a/test/external_project/seqan3_submodule_find_package/CMakeLists.txt +++ b/test/external_project/seqan3_submodule_find_package/CMakeLists.txt @@ -10,7 +10,7 @@ include (../find-package-diagnostics.cmake) # --- # add seqan3 to search path -list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/submodules/seqan3/build_system") # change this value +list (APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/submodules/seqan3/cmake") # require seqan3 with a version between >=3.0.0 and <4.0.0 find_package (seqan3 3.0 REQUIRED) diff --git a/test/seqan3-test.cmake b/test/seqan3-test.cmake index 35641043ef..afc50e8dda 100644 --- a/test/seqan3-test.cmake +++ b/test/seqan3-test.cmake @@ -9,12 +9,12 @@ cmake_minimum_required (VERSION 3.10...3.30) # require SeqAn3 package -find_package (SeqAn3 REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../build_system) +find_package (SeqAn3 REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../cmake) enable_testing () set (CPM_INDENT "CMake Package Manager CPM: ") -CPMUsePackageLock ("${CMAKE_CURRENT_LIST_DIR}/../build_system/package-lock.cmake") +CPMUsePackageLock ("${CMAKE_CURRENT_LIST_DIR}/../cmake/package-lock.cmake") include (CheckCXXCompilerFlag) include (CheckCXXSourceCompiles)