cpu_features 0.4.1 (new formula)

Closes #43429.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
This commit is contained in:
Caleb Xu 2019-08-24 01:00:55 -04:00 committed by Chongyu Zhu
parent 816d2bac96
commit 5062c20791
No known key found for this signature in database
GPG key ID: 1A43E3C9100B38F5

24
Formula/cpu_features.rb Normal file
View 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