code: def _gen_defs(self):
      if self.cxx_flags:
          yield ("ARROW_CXXFLAGS", self.cxx_flags)
  
      yield ("CMAKE_EXPORT_COMPILE_COMMANDS", truthifier(True))
      yield ("CMAKE_BUILD_TYPE", self.build_type)
  
      if not self.with_lint_only:
          yield (
              "BUILD_WARNING_LEVEL",
              or_else(self.warn_level, "production"),
          )
  
      # if not ctx.quiet:
      #   yield ("ARROW_VERBOSE_THIRDPARTY_BUILD", "ON")
  
      maybe_prefix = self.install_prefix
      if maybe_prefix:
          yield ("CMAKE_INSTALL_PREFIX", maybe_prefix)
  
      if self._package_prefix is not None:
          yield ("ARROW_DEPENDENCY_SOURCE", "SYSTEM")
          yield ("ARROW_PACKAGE_PREFIX", self._package_prefix)
  
      yield ("ARROW_BUILD_STATIC", truthifier(self.build_static))
      yield ("ARROW_BUILD_SHARED", truthifier(self.build_shared))
      yield ("CMAKE_UNITY_BUILD", truthifier(self.build_unity))
  
      # Tests and benchmarks
      yield ("ARROW_BUILD_TESTS", truthifier(self.with_tests))
      yield ("ARROW_BUILD_BENCHMARKS", truthifier(self.with_benchmarks))
      yield ("ARROW_BUILD_EXAMPLES", truthifier(self.with_examples))
      yield (
          "ARROW_BUILD_INTEGRATION",
          truthifier(self.with_integration),
      )
  
      # Static checks
      yield ("ARROW_USE_ASAN", truthifier(self.use_asan))
      yield ("ARROW_USE_TSAN", truthifier(self.use_tsan))
      yield ("ARROW_USE_UBSAN", truthifier(self.use_ubsan))
      yield ("ARROW_FUZZING", truthifier(self.with_fuzzing))
  
      # Components
      yield ("ARROW_COMPUTE", truthifier(self.with_compute))
      yield ("ARROW_CSV", truthifier(self.with_csv))
      yield ("ARROW_CUDA", truthifier(self.with_cuda))
      yield ("ARROW_DATASET", truthifier(self.with_dataset))
      yield ("ARROW_FILESYSTEM", truthifier(self.with_filesystem))
      yield ("ARROW_FLIGHT", truthifier(self.with_flight))
      yield ("ARROW_GANDIVA", truthifier(self.with_gandiva))
      yield ("ARROW_GCS", truthifier(self.with_gcs))
      yield ("ARROW_HDFS", truthifier(self.with_hdfs))
      yield ("ARROW_IPC", truthifier(self.with_ipc))
      yield ("ARROW_JSON", truthifier(self.with_json))
      yield ("ARROW_MIMALLOC", truthifier(self.with_mimalloc))
      yield ("ARROW_JEMALLOC", truthifier(self.with_jemalloc))
      yield ("ARROW_PARQUET", truthifier(self.with_parquet))
      yield ("ARROW_S3", truthifier(self.with_s3))
  
      # Compressions
      yield ("ARROW_WITH_BROTLI", truthifier(self.with_brotli))
      yield ("ARROW_WITH_BZ2", truthifier(self.with_bz2))
      yield ("ARROW_WITH_LZ4", truthifier(self.with_lz4))
      yield ("ARROW_WITH_SNAPPY", truthifier(self.with_snappy))
      yield ("ARROW_WITH_ZLIB", truthifier(self.with_zlib))
      yield ("ARROW_WITH_ZSTD", truthifier(self.with_zstd))
  
      yield ("ARROW_LINT_ONLY", truthifier(self.with_lint_only))
  
      # Some configurations don't like gnu gold linker.
      broken_with_gold_ld = [self.with_fuzzing, self.with_gandiva]
      if self.use_gold_linker and not any(broken_with_gold_ld):
          yield ("ARROW_USE_LD_GOLD", truthifier(self.use_gold_linker))
      yield ("ARROW_SIMD_LEVEL", or_else(self.simd_level, "DEFAULT"))
  
      # Detect custom conda toolchain
      if self.use_conda:
          for d, v in [("CMAKE_AR", "AR"), ("CMAKE_RANLIB", "RANLIB")]:
              v = os.environ.get(v)
              if v:
                  yield (d, v)
  
file_path: arrow/dev/archery/archery/lang/cpp.py
imports: import os
  from ..utils.cmake import CMakeDefinition
label_desc: Use image node_id 5 for calling the CppConfiguration obj's underlying member method code with example usage: obj._gen_defs() without return types