Skip to content

Commit

Permalink
constexpr backward compat cleanup in build files
Browse files Browse the repository at this point in the history
  • Loading branch information
hivert committed Oct 28, 2023
1 parent 137224a commit a9db482
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ include(CheckCXXSourceCompiles)
include(CheckCXXCompilerFlag)

## Check for buggy constexpr support G++ 5.0
check_cxx_source_compiles(
"
using T = int;
constexpr int exec(T f()) { return f(); }
constexpr int foo() { return 1; }
static_assert(exec(foo) == 1, \"Failed exec\");
int main() {}
"
HPCOMBI_CONSTEXPR_FUN_ARGS)
# check_cxx_source_compiles(
# "
# using T = int;
# constexpr int exec(T f()) { return f(); }
# constexpr int foo() { return 1; }
# static_assert(exec(foo) == 1, \"Failed exec\");
# int main() {}
# "
# HPCOMBI_CONSTEXPR_FUN_ARGS)

check_cxx_compiler_flag('-march=native' HPCOMBI_HAVE_FLAG_ARCH_NATIVE)
check_cxx_compiler_flag('-mtune=native' HPCOMBI_HAVE_FLAG_TUNE_NATIVE)
Expand Down
9 changes: 0 additions & 9 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,10 @@
#ifndef HPCOMBI_CONFIG_HPP
#define HPCOMBI_CONFIG_HPP

// Whether the compiler provide the "experimental/numeric" include file
#cmakedefine HPCOMBI_HAVE_EXPERIMENTAL_NUMERIC

// Whether std::experimental::lcm function works
#cmakedefine HPCOMBI_HAVE_EXPERIMENTAL_NUMERIC_LCM

// Google sparse hash map
#cmakedefine HPCOMBI_HAVE_DENSEHASHMAP

// Google sparse hash set
#cmakedefine HPCOMBI_HAVE_DENSEHASHSET

// GCC-4.8 constexpr function argument bug
#cmakedefine HPCOMBI_CONSTEXPR_FUN_ARGS

#endif // HPCOMBI_CONFIG_HPP

0 comments on commit a9db482

Please sign in to comment.