Skip to content

Commit

Permalink
Merge pull request #3292 from eseiler/infra/rename
Browse files Browse the repository at this point in the history
[INFRA] Rename build_system to cmake
  • Loading branch information
eseiler authored Oct 24, 2024
2 parents 31a3b14 + 082447a commit 0b86c65
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cron_latest_libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
Expand Down
3 changes: 2 additions & 1 deletion test/api_stability/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<SOURCE_DIR>"
COMMAND ${CMAKE_COMMAND} -E remove_directory "<SOURCE_DIR>/include"
COMMAND ${CMAKE_COMMAND} -E remove_directory "<SOURCE_DIR>/submodules"
COMMAND ${CMAKE_COMMAND} -E remove_directory "<SOURCE_DIR>/build_system"
COMMAND ${CMAKE_COMMAND} -E remove_directory "<SOURCE_DIR>/cmake"
COMMAND sh -c "${git_apply}"
TEST_BEFORE_INSTALL TRUE
TEST_COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j
Expand Down
2 changes: 1 addition & 1 deletion test/api_stability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The workflow entails these steps:
`<seqan3_git_source>/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 `<seqan3_git_source>/build_system`.
3. Use the current version of `find_package (SeqAn3)` found in `<seqan3_git_source>/cmake`.
4. Configure the tests `<seqan3_lsr_source>/test/unit` with our current seqan3 header-library
(e.g. `<seqan3_git_source>/include` and `<seqan3_git_source>/submodules/*/include`).
* But use the test cases from the LSR.
Expand Down
8 changes: 4 additions & 4 deletions test/documentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
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}")

# ----------------------------------------------------------------------------
# CPM
# ----------------------------------------------------------------------------

# 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)
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
Expand Down
4 changes: 2 additions & 2 deletions test/external_project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <checkout>/seqan3/build_system
# We have a seqan3 checkout somewhere and we point CMAKE_PREFIX_PATH to <checkout>/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 ../)
Expand All @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion test/external_project/seqan3_setup_tutorial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/seqan3-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b86c65

Please sign in to comment.