diff options
| author | Jack Nagel | 2012-05-22 16:32:12 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2012-05-22 16:32:12 -0500 | 
| commit | c0bbf60eaff5d80995f3c69c0d4ca022c2acf6f6 (patch) | |
| tree | c134e98a0fd7a17f48eeed64f84560b14a17bd97 | |
| parent | 86a679569f9489a5581758cbd6b9e1add1aff63e (diff) | |
| download | homebrew-c0bbf60eaff5d80995f3c69c0d4ca022c2acf6f6.tar.bz2 | |
Introduce std_cmake_args method
This differs from the current std_cmake_parameters in that it returns an
array instead of a string. Doing so makes dealing with it in formulae
much more pleasant, and for new formula hackers, less surprising.
std_cmake_parameters is retained in compat to maintain compatibility
with external formulae.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/compat/compatibility.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 4 | 
2 files changed, 6 insertions, 2 deletions
| diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb index 90fa4b633..1dcb52cb4 100644 --- a/Library/Homebrew/compat/compatibility.rb +++ b/Library/Homebrew/compat/compatibility.rb @@ -87,6 +87,10 @@ class Formula      @cc_failures ||= CompilerFailures.new      @cc_failures << fails_with_llvm_reason    end + +  def std_cmake_parameters +    "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -Wno-dev" +  end  end  class UnidentifiedFormula < Formula diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index af12bc185..04e6e2df1 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -239,8 +239,8 @@ class Formula    # Setting it to Release would ignore our flags.    # Note: there isn't a std_autotools variant because autotools is a lot    # less consistent and the standard parameters are more memorable. -  def std_cmake_parameters -    "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -Wno-dev" +  def std_cmake_args +    %W[-DCMAKE_INSTALL_PREFIX=#{prefix} -DCMAKE_BUILD_TYPE=None -Wno-dev]    end    def self.class_s name | 
