Test IsConvertibleToInt with a C++11 enum

This commit is contained in:
vitaut
2015-03-18 11:02:37 -07:00
parent 23b60f5735
commit 2adbfa4af7
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -14,6 +14,14 @@ function(add_fmt_test name)
add_test(NAME ${name} COMMAND ${name})
endfunction()
check_cxx_source_compiles("
enum C : char {A};
int main() {}"
HAVE_ENUM_BASE)
if (HAVE_ENUM_BASE)
add_definitions(-DFMT_USE_ENUM_BASE=1)
endif ()
add_fmt_test(gtest-extra-test)
add_fmt_test(format-test)
add_fmt_test(format-impl-test CUSTOM_LINK)