From 5f96e1804f66919bba35a7dfb7b4d81602b11a3f Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 30 Jul 2023 19:59:33 +0200 Subject: [PATCH] CI: Use CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY tweak --- .circleci/config.yml | 1 + .cirrus.yml | 4 +++- .github/actions/helper-build-ldc/action.yml | 2 ++ .github/workflows/supported_llvm_versions.yml | 1 + runtime/CMakeLists.txt | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6854d630082..4c657374583 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,6 +79,7 @@ commonSteps: &commonSteps -DCMAKE_BUILD_TYPE=Release \ -DD_COMPILER=$PWD/../host-ldc/bin/ldmd2 \ -DLDC_LINK_MANUALLY=OFF \ + -DCMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY=ON \ $EXTRA_CMAKE_FLAGS ninja -j$PARALLELISM obj/ldc2.o all ldc2-unittest all-test-runners bin/ldc2 -version diff --git a/.cirrus.yml b/.cirrus.yml index 01993862785..128da121254 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -26,6 +26,7 @@ common_steps_template: &COMMON_STEPS_TEMPLATE -DCMAKE_INSTALL_PREFIX=$installDir \ -DINCLUDE_INSTALL_DIR=$installDir/import \ -DLDC_LINK_MANUALLY=OFF \ + -DCMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY=ON \ "${extraFlags[@]}" ninja -j$PARALLELISM obj/ldc2.o all ldc2-unittest all-test-runners bin/ldc2 -version @@ -405,7 +406,8 @@ task: -DLLVM_ROOT_DIR=$PWD/../llvm \ -DD_COMPILER=$PWD/../host-ldc/bin/ldmd2 \ -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_LTO_LIBS=ON + -DBUILD_LTO_LIBS=ON \ + -DCMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY=ON ninja -j$PARALLELISM obj/ldc2.o all bin/ldc2 -version << : *COMMON_STEPS_TEMPLATE diff --git a/.github/actions/helper-build-ldc/action.yml b/.github/actions/helper-build-ldc/action.yml index 3fafd106f0c..3d5fff18aed 100644 --- a/.github/actions/helper-build-ldc/action.yml +++ b/.github/actions/helper-build-ldc/action.yml @@ -35,6 +35,7 @@ runs: -DLLVM_ROOT_DIR="$PWD/../${{ inputs.llvm_dir }}" \ -DD_COMPILER='${{ inputs.host_dc }}' \ -DLDC_LINK_MANUALLY=OFF \ + -DCMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY=ON \ ${{ inputs.specify_install_dir == 'true' && '-DCMAKE_INSTALL_PREFIX="$installDir"' || '' }} \ ${{ inputs.specify_install_dir == 'true' && '-DINCLUDE_INSTALL_DIR="$installDir/import"' || '' }} \ ${{ inputs.cmake_flags }} @@ -57,6 +58,7 @@ runs: "-DD_COMPILER=${{ inputs.host_dc }}" ^ -DCMAKE_C_COMPILER=clang-cl ^ -DCMAKE_CXX_COMPILER=clang-cl ^ + -DCMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY=ON ^ ${{ inputs.specify_install_dir == 'true' && '"-DCMAKE_INSTALL_PREFIX=%installDir%"' || '' }} ^ ${{ inputs.specify_install_dir == 'true' && '"-DINCLUDE_INSTALL_DIR=%installDir%\import"' || '' }} ^ ${{ inputs.cmake_flags }} diff --git a/.github/workflows/supported_llvm_versions.yml b/.github/workflows/supported_llvm_versions.yml index 3d7b697d887..e8d96eb0982 100644 --- a/.github/workflows/supported_llvm_versions.yml +++ b/.github/workflows/supported_llvm_versions.yml @@ -121,6 +121,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ROOT_DIR="$PWD/llvm" \ -DLDC_LINK_MANUALLY=OFF \ + -DCMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY=ON \ ${{ matrix.cmake_flags }} ninja obj/ldc2.o all ldc2-unittest all-test-runners bin/ldc2 --version diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index c6334de4be8..abcc804aae2 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -335,6 +335,7 @@ if(TARGET gen_gccbuiltins) add_custom_command( OUTPUT ${module} COMMAND gen_gccbuiltins ${module} "${name}" + DEPENDS gen_gccbuiltins ) endfunction()