Skip to content

Commit

Permalink
Merge pull request #199666 from Homebrew/dup-build-testing
Browse files Browse the repository at this point in the history
formulae: remove duplicate `BUILD_TESTING` arg
  • Loading branch information
chenrui333 authored Dec 1, 2024
2 parents 0f6e541 + 1b034d3 commit 937bff1
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Formula/c/cctz.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Cctz < Formula
depends_on "cmake" => :build

def install
args = ["-DBUILD_TESTING=OFF", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"]
args = ["-DCMAKE_POSITION_INDEPENDENT_CODE=ON"]

system "cmake", "-S", ".", "-B", "build_shared", "-DBUILD_SHARED_LIBS=ON", *args, *std_cmake_args
system "cmake", "--build", "build_shared"
Expand Down
7 changes: 1 addition & 6 deletions Formula/c/cnats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ class Cnats < Formula
depends_on "protobuf-c"

def install
args = %W[
-DCMAKE_INSTALL_PREFIX=#{prefix}
-DBUILD_TESTING=OFF
]

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand Down
1 change: 0 additions & 1 deletion Formula/c/cryfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Cryfs < Formula

def install
system "cmake", "-B", "build", "-S", ".",
"-DBUILD_TESTING=off",
"-DCRYFS_UPDATE_CHECKS=OFF",
"-DDEPENDENCY_CONFIG=cmake-utils/DependenciesFromLocalSystem.cmake",
*std_cmake_args
Expand Down
12 changes: 6 additions & 6 deletions Formula/d/dartsim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ class Dartsim < Formula
end

def install
args = std_cmake_args
args = %W[
-DCMAKE_INSTALL_RPATH=#{rpath}
-DDART_BUILD_DARTPY=OFF
-DDART_ENABLE_SIMD=OFF
]

if OS.mac?
# Force to link to system GLUT (see: https://cmake.org/Bug/view.php?id=16045)
glut_lib = "#{MacOS.sdk_path}/System/Library/Frameworks/GLUT.framework"
args << "-DGLUT_glut_LIBRARY=#{glut_lib}"
end

args << "-DBUILD_TESTING=OFF"
args << "-DDART_BUILD_DARTPY=OFF"
args << "-DDART_ENABLE_SIMD=OFF"

system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *args
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"

Expand Down
1 change: 0 additions & 1 deletion Formula/e/embree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class Embree < Formula

def install
args = %w[
-DBUILD_TESTING=OFF
-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF
-DEMBREE_ISPC_SUPPORT=ON
-DEMBREE_TUTORIALS=OFF
Expand Down
3 changes: 1 addition & 2 deletions Formula/i/inja.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class Inja < Formula
depends_on "nlohmann-json"

def install
system "cmake", ".", "-DBUILD_TESTING=OFF",
"-DBUILD_BENCHMARK=OFF",
system "cmake", ".", "-DBUILD_BENCHMARK=OFF",
"-DINJA_USE_EMBEDDED_JSON=OFF",
*std_cmake_args
system "make", "install"
Expand Down
2 changes: 1 addition & 1 deletion Formula/lib/libchewing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Libchewing < Formula
end

def install
system "cmake", "-S", ".", "-B", "build", "-DBUILD_TESTING=OFF", *std_cmake_args
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand Down
8 changes: 6 additions & 2 deletions Formula/n/netcdf-cxx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ class NetcdfCxx < Formula
end

def install
args = std_cmake_args + %w[-DBUILD_TESTING=OFF -DNCXX_ENABLE_TESTS=OFF -DENABLE_TESTS=OFF -DENABLE_NETCDF_4=ON
-DENABLE_DOXYGEN=OFF]
args = std_cmake_args + %w[
-DNCXX_ENABLE_TESTS=OFF
-DENABLE_TESTS=OFF
-DENABLE_NETCDF_4=ON
-DENABLE_DOXYGEN=OFF
]

# https://github.com/Unidata/netcdf-cxx4/issues/151#issuecomment-2041111870
args << "-DHDF5_C_LIBRARY_hdf5=#{Formula["hdf5"].opt_lib}"
Expand Down
2 changes: 1 addition & 1 deletion Formula/n/netcdf-fortran.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class NetcdfFortran < Formula
depends_on "netcdf"

def install
args = std_cmake_args + %w[-DBUILD_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_NETCDF_4=ON -DENABLE_DOXYGEN=OFF]
args = std_cmake_args + %w[-DENABLE_TESTS=OFF -DENABLE_NETCDF_4=ON -DENABLE_DOXYGEN=OFF]

# Help netcdf-fortran find netcf
# https://github.com/Unidata/netcdf-fortran/issues/301#issuecomment-1183204019
Expand Down
4 changes: 1 addition & 3 deletions Formula/o/opencl-clhpp-headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ class OpenclClhppHeaders < Formula
depends_on "opencl-headers"

def install
system "cmake", "-DBUILD_TESTING=OFF",
system "cmake", "-S", ".", "-B", "build",
"-DBUILD_DOCS=OFF",
"-DBUILD_EXAMPLES=OFF",
"-S", ".",
"-B", "build",
*std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
Expand Down
1 change: 0 additions & 1 deletion Formula/u/uvw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class Uvw < Formula
def install
args = %w[
-DBUILD_UVW_LIBS=ON
-DBUILD_TESTING=OFF
-DBUILD_DOCS=OFF
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
Expand Down

0 comments on commit 937bff1

Please sign in to comment.