From aa74bb0ecb804c24b87a7adfc264f8eb2e01d661 Mon Sep 17 00:00:00 2001 From: ConfiG Date: Wed, 2 Aug 2023 18:27:38 +0300 Subject: [PATCH 1/2] fix ci --- .github/workflows/build.yml | 8 ++------ CMakeLists.txt | 8 ++++++-- loader/CMakeLists.txt | 12 +++++++++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2c1798fd..665ef01c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,8 @@ jobs: os: windows-latest id: win extra_flags: > - -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl + -DCMAKE_C_COMPILER=$VCINSTALLDIR\Tools\Llvm\bin\clang-cl.exe + -DCMAKE_CXX_COMPILER=$VCINSTALLDIR\Tools\Llvm\bin\clang-cl.exe -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEODE_DEBUG=On cli_cmd: '' package_cmd: 'makensis -WX -V3 ./installer/windows/installer.nsi' @@ -60,11 +61,6 @@ jobs: arch: amd64_x86 if: matrix.config.id == 'win' - - name: Install ninja - shell: bash - run: choco install ninja - if: matrix.config.id == 'win' - - name: Download CLI uses: robinraju/release-downloader@v1.8 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bdcd8914..46e2cb186 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,8 +109,12 @@ set(CMAKE_WARN_DEPRECATED ON CACHE BOOL "" FORCE) include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wno-everything SUPPORTS_W_NO_EVERYTHING) if (SUPPORTS_W_NO_EVERYTHING) - target_compile_options(capstone-static PRIVATE -Wno-everything) - target_compile_options(keystone PRIVATE -Wno-everything) + if (TARGET capstone-static) + target_compile_options(capstone-static PRIVATE -Wno-everything) + endif() + if (TARGET keystone) + target_compile_options(keystone PRIVATE -Wno-everything) + endif() endif() target_sources(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/entry.cpp) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 793b88f71..5b5b2316d 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -181,9 +181,15 @@ if (NOT GEODE_BUILDING_DOCS) include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-Wno-everything SUPPORTS_W_NO_EVERYTHING) if (SUPPORTS_W_NO_EVERYTHING) - target_compile_options(md4c PRIVATE -Wno-everything) - target_compile_options(zlib PRIVATE -Wno-everything) - target_compile_options(zlibstatic PRIVATE -Wno-everything) + if (TARGET md4c) + target_compile_options(md4c PRIVATE -Wno-everything) + endif() + if (TARGET zlib) + target_compile_options(zlib PRIVATE -Wno-everything) + endif() + if (TARGET zlibstatic) + target_compile_options(zlibstatic PRIVATE -Wno-everything) + endif() endif() # Regex support From 25d9ab04fd3ae1d74a8670481feeea4ea9d6f38f Mon Sep 17 00:00:00 2001 From: ConfiG Date: Wed, 2 Aug 2023 18:30:08 +0300 Subject: [PATCH 2/2] fix ci 2 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 665ef01c5..0e2bc3b44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,8 +27,8 @@ jobs: os: windows-latest id: win extra_flags: > - -DCMAKE_C_COMPILER=$VCINSTALLDIR\Tools\Llvm\bin\clang-cl.exe - -DCMAKE_CXX_COMPILER=$VCINSTALLDIR\Tools\Llvm\bin\clang-cl.exe + -DCMAKE_C_COMPILER=%VCINSTALLDIR%\Tools\Llvm\bin\clang-cl.exe + -DCMAKE_CXX_COMPILER=%VCINSTALLDIR%\Tools\Llvm\bin\clang-cl.exe -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEODE_DEBUG=On cli_cmd: '' package_cmd: 'makensis -WX -V3 ./installer/windows/installer.nsi'