Skip to content
Snippets Groups Projects
Commit 26ef684c authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CMake] Add check for HAVE_CONSTEXPR.

parent 3693d3a1
No related branches found
No related tags found
No related merge requests found
......@@ -324,4 +324,22 @@ check_cxx_source_compiles("
" HAVE_INITIALIZER_LIST
)
# constexpr
check_cxx_source_compiles("
constexpr int foo()
{ return 0; }
template<int v>
struct A
{
static const int value = v;
};
int main(void)
{
return A<foo()>::value;
}
" HAVE_CONSTEXPR
)
cmake_pop_check_state()
......@@ -160,6 +160,9 @@
/* Define to 1 if initializer list is supported */
#cmakedefine HAVE_INITIALIZER_LIST 1
/* Define to 1 if C++11 constexpr is supported */
#cmakedefine HAVE_CONSTEXPR 1
/* Define to if the UMFPack library is available */
#cmakedefine HAVE_UMFPACK ENABLE_UMFPACK
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment