Skip to content

Commit

Permalink
Fix github CI
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Shumilov <[email protected]>
  • Loading branch information
PetrShumilov committed Jan 28, 2025
1 parent 42032b9 commit 3a5db1b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
brew install [email protected] re2c cmake coreutils openssl libiconv re2 pcre yaml-cpp zstd googletest shivammathur/php/[email protected]
brew link --overwrite --force shivammathur/php/[email protected]
/opt/homebrew/opt/[email protected]/libexec/bin/python -m pip install --upgrade pip --break-system-packages && /opt/homebrew/opt/[email protected]/libexec/bin/pip install --break-system-packages jsonschema
- name: Run cmake
run: cmake -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DDOWNLOAD_MISSING_LIBRARIES=On -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build

Expand Down
9 changes: 6 additions & 3 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,15 @@ function(update_git_submodules)

# Update submodules
execute_process(
COMMAND git submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND /usr/bin/git submodule update --init --recursive -v
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE update_result
OUTPUT_VARIABLE out1
ERROR_VARIABLE err1
ERROR_QUIET
)

message("out='${out1}'")
message("err='${err1}'")
if(NOT update_result EQUAL 0)
message(FATAL_ERROR "Failed to update Git submodules.")
endif()
Expand Down
2 changes: 1 addition & 1 deletion compiler/compiler-settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void append_3dparty_lib(std::string &ld_flags, const std::string &path_to_3dpart
ld_flags += " " + path_to_3dparty + "lib/lib" + libname + ".a";
}

void append_curl([[maybe_unused]] std::string &cxx_flags, std::string &ld_flags, const std::string &path_to_3dparty) noexcept {
void append_curl([[maybe_unused]] std::string &cxx_flags, std::string &ld_flags, [[maybe_unused]] const std::string &path_to_3dparty) noexcept {
if (!contains_lib(ld_flags, "curl")) {
#if defined(__APPLE__)
ld_flags += " -lcurl";
Expand Down
8 changes: 6 additions & 2 deletions third-party/curl-cmake/curl.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
set(CURL_INSTALL_DIR ${CMAKE_BINARY_DIR}/third-party/curl)
file(MAKE_DIRECTORY ${CURL_INSTALL_DIR})

set(CURL_COMPILE_FLAGS "-Wno-deprecated-declarations")
if(COMPILER_CLANG)
set(CURL_COMPILE_FLAGS "${CURL_COMPILE_FLAGS} -Wno-string-plus-int")
endif()

ExternalProject_Add(
curl
SOURCE_DIR ${THIRD_PARTY_DIR}/curl
Expand All @@ -21,8 +26,7 @@ ExternalProject_Add(
-DCMAKE_INSTALL_PREFIX=${CURL_INSTALL_DIR}
-DCMAKE_INSTALL_LIBDIR=${CURL_INSTALL_DIR}/lib/
-DCMAKE_INSTALL_INCLUDEDIR=${CURL_INSTALL_DIR}/include
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations"
-DCMAKE_C_FLAGS="-Wno-deprecated-declarations"
-DCMAKE_C_FLAGS=${CURL_COMPILE_FLAGS}
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
INSTALL_COMMAND
${CMAKE_COMMAND} --install . --config $<CONFIG> &&
Expand Down

0 comments on commit 3a5db1b

Please sign in to comment.