diff --git a/.github/workflows/clp-core-build-macos.yaml b/.github/workflows/clp-core-build-macos.yaml index 51eb6985d0..dd82bca50a 100644 --- a/.github/workflows/clp-core-build-macos.yaml +++ b/.github/workflows/clp-core-build-macos.yaml @@ -45,8 +45,11 @@ jobs: strategy: matrix: os: - - "macos-13" - - "macos-14" + # NOTE: We temporarily disable macOS 13 and 14 since older versions of `AppleClang` do + # not support C++ 20 required by `ystdlib`. + # See https://github.com/y-scope/clp/issues/1090 for more details. + # - "macos-13" + # - "macos-14" - "macos-15" use_shared_libs: - true diff --git a/components/core/CMakeLists.txt b/components/core/CMakeLists.txt index 6b4c966a29..be4c883b8c 100644 --- a/components/core/CMakeLists.txt +++ b/components/core/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.23) # Toolchain setup must come before the first project() call in the entire CMake buildsystem. # If CLP is not the top-level project, the following setup has no effect. @@ -283,10 +283,8 @@ if(CLP_NEED_YAMLCPP) endif() # Add ystdlib -if(CLP_NEED_YSTDLIB) - set(YSTDLIB_CPP_BUILD_TESTING OFF) - add_subdirectory("${CLP_YSTDLIB_SOURCE_DIRECTORY}" "${CMAKE_BINARY_DIR}/ystdlib" EXCLUDE_FROM_ALL) -endif() +find_package(ystdlib REQUIRED) +message(STATUS "Found ystdlib ${ystdlib_VERSION}") # Find and setup ZStd Library if(CLP_NEED_ZSTD) diff --git a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh index 130374062e..5750b0005c 100755 --- a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh +++ b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh @@ -9,9 +9,10 @@ set -u script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" lib_install_scripts_dir=$script_dir/.. -# NOTE: boost must be installed first since the remaining packages depend on it +# NOTE: boost must be installed first since other packages depend on it "$lib_install_scripts_dir"/install-boost.sh 1.87.0 +"$lib_install_scripts_dir"/install-cmake.sh 3.23.5 "$lib_install_scripts_dir"/libarchive.sh 3.5.1 "$lib_install_scripts_dir"/liblzma.sh 5.4.6 "$lib_install_scripts_dir"/lz4.sh 1.8.2 diff --git a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh index 03a3c26e8c..b19e4c3c3e 100755 --- a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh +++ b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-prebuilt-packages.sh @@ -10,7 +10,6 @@ apt-get update DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ ca-certificates \ checkinstall \ - cmake \ curl \ build-essential \ git \ diff --git a/taskfiles/deps/main.yaml b/taskfiles/deps/main.yaml index c05829bf76..e34afe1818 100644 --- a/taskfiles/deps/main.yaml +++ b/taskfiles/deps/main.yaml @@ -374,20 +374,16 @@ tasks: ystdlib: internal: true - vars: - LIB_NAME: "ystdlib" - YSTDLIB_OUTPUT_DIR: "{{.G_DEPS_CORE_DIR}}/{{.LIB_NAME}}-src" run: "once" - deps: - - task: "utils:init" cmds: - - task: "yscope-dev-utils:remote:download-and-extract-tar" + - task: "utils:install-remote-cmake-lib" vars: - CHECKSUM_FILE: "{{.G_DEPS_CORE_CHECKSUMS_DIR}}/{{.LIB_NAME}}.md5" - FILE_SHA256: "36fa0e9d96b7307ca92482343d6ba1091c5576370676e6d423cce32c20e34a3d" - OUTPUT_DIR: "{{.YSTDLIB_OUTPUT_DIR}}" - URL: "https://github.com/y-scope/ystdlib-cpp/archive/d80cf86.tar.gz" - - >- - echo "set( - CLP_YSTDLIB_SOURCE_DIRECTORY \"{{.YSTDLIB_OUTPUT_DIR}}\" - )" > "{{.G_DEPS_CORE_CMAKE_SETTINGS_DIR}}/{{.LIB_NAME}}.cmake" + CMAKE_GEN_ARGS: + - "-Dystdlib_BUILD_TESTING=OFF" + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + - "-DCMAKE_POLICY_DEFAULT_CMP0144=NEW" + LIB_NAME: "ystdlib" + WORK_DIR: "{{.G_DEPS_DIR}}/ystdlib" + TARBALL_SHA256: "4c027c884506e1775070192f9d1d58238a6d5b078608211fa442477393676738" + TARBALL_URL: "https://github.com/y-scope/ystdlib-cpp/archive/0ae886c.tar.gz"