cpu_features 0.4.1 (new formula)
Closes #43429. Signed-off-by: Chongyu Zhu <i@lembacon.com>
This commit is contained in:
parent
816d2bac96
commit
5062c20791
1 changed files with 24 additions and 0 deletions
24
Formula/cpu_features.rb
Normal file
24
Formula/cpu_features.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
class CpuFeatures < Formula
|
||||
desc "Cross platform C99 library to get cpu features at runtime"
|
||||
homepage "https://github.com/google/cpu_features"
|
||||
url "https://github.com/google/cpu_features/archive/v0.4.1.tar.gz"
|
||||
sha256 "b7b6b27f759410f73f15f935ae646f30c9c6742731dc354416399677bd418156"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
system "cmake", ".", *std_cmake_args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
output = shell_output(bin/"list_cpu_features")
|
||||
assert_match /^arch\s*:/, output
|
||||
assert_match /^brand\s*:/, output
|
||||
assert_match /^family\s*:/, output
|
||||
assert_match /^model\s*:/, output
|
||||
assert_match /^stepping\s*:/, output
|
||||
assert_match /^uarch\s*:/, output
|
||||
assert_match /^flags\s*:/, output
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue