Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  BUILD.gn   Sprache: unbekannt

 
# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chromium/build/config/arm.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")

config("common_config") {
  cflags = [ "-Wno-shadow" ]

  if (is_win) {
    defines = [
      # Required to use math constants from math.h.
      "_USE_MATH_DEFINES",
    ]
  }

  # PFFFT doesn't support SIMD on some cpus, so build a scalar version.
  if ((target_cpu == "arm" && !arm_use_neon) || target_cpu == "mipsel" ||
      target_cpu == "mips64el" || target_cpu == "ppc64" ||
      target_cpu == "riscv64" || target_cpu == "s390x" ||
      target_cpu == "loong64") {
    defines = [ "PFFFT_SIMD_DISABLE" ]
  }
}

static_library("pffft") {
  configs += [ ":common_config" ]
  sources = [
    "src/pffft.c",
    "src/pffft.h",
  ]
}

# Fuzzing.
if (false) {
group("fuzzers") {
  testonly = true
  deps = [
    ":pffft_complex_fuzzer",
    ":pffft_real_fuzzer",
  ]
}

fuzzer_testdata_dir = "$target_gen_dir/testdata"

action("generate_pffft_fuzzer_corpus") {
  script = "generate_seed_corpus.py"
  sources = [ "generate_seed_corpus.py" ]
  args = [ rebase_path(fuzzer_testdata_dir, root_build_dir) ]
  outputs = [ fuzzer_testdata_dir ]
}

fuzzer_test("pffft_complex_fuzzer") {
  sources = [ "pffft_fuzzer.cc" ]
  cflags = [ "-DTRANSFORM_COMPLEX" ]
  deps = [ ":pffft" ]
  seed_corpus = fuzzer_testdata_dir
  seed_corpus_deps = [ ":generate_pffft_fuzzer_corpus" ]
}

fuzzer_test("pffft_real_fuzzer") {
  sources = [ "pffft_fuzzer.cc" ]
  cflags = [ "-DTRANSFORM_REAL" ]
  deps = [ ":pffft" ]
  seed_corpus = fuzzer_testdata_dir
  seed_corpus_deps = [ ":generate_pffft_fuzzer_corpus" ]
}

# Unit tests and benchmark.

# This target must be used only for testing and benchmark purposes.
static_library("fftpack") {
  testonly = true
  configs += [ ":common_config" ]
  sources = [
    "src/fftpack.c",
    "src/fftpack.h",
  ]
  visibility = [ ":*" ]
}

config("pffft_benchmark_internal_config") {
  cflags = [
    # test_pffft.c contains an `exit(1)` following a `break` statement.
    "-Wno-unreachable-code",
  ]
}

executable("pffft_benchmark") {
  testonly = true
  configs += [
    ":common_config",
    ":pffft_benchmark_internal_config",
  ]
  sources = [ "src/test_pffft.c" ]
  deps = [
    ":fftpack",
    ":pffft",
  ]
}

test("pffft_unittest") {
  testonly = true
  sources = [ "pffft_unittest.cc" ]
  deps = [
    ":fftpack",
    ":pffft",
    "//testing/gtest",
    "//testing/gtest:gtest_main",
  ]
}
}

[ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet)  ]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge