Skip to content
Snippets Groups Projects
BuildInfo.h 906 B
/* Copyright (C) 2022 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
   SPDX-License-Identifier: GPL-3.0-only
   Authors: Felix Weiglhofer [committer]*/
#ifndef CBM_ALGO_BUILD_INFO_H
#define CBM_ALGO_BUILD_INFO_H

#include <string>

#if defined(HAVE_TBB) && defined(__cpp_lib_parallel_algorithm)
#define HAVE_PARALLEL_ALGORITHM
#endif

#if __has_include(<omp.h>)
#define HAVE_OMP
#endif

namespace cbm::algo::BuildInfo
{

  extern const std::string GIT_HASH;
  extern const std::string BUILD_TYPE;
  extern const bool GPU_DEBUG;

  inline constexpr bool WITH_TBB =
#ifdef HAVE_TBB
    true;
#else
    false;
#endif

  inline constexpr bool WITH_PARALLEL_ALGORITHM =
#ifdef HAVE_PARALLEL_ALGORITHM
    true;
#else
    false;
#endif

  inline constexpr bool WITH_OMP =
#ifdef HAVE_OMP
    true;
#else
    false;
#endif

}  // namespace cbm::algo::BuildInfo

#endif  // CBM_ALGO_BUILD_INFO_H