mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Fix FMT_STATIC_ASSERT compile test
FMT_STATIC_ASSERT is defined in posix.h so expect_compile_error was actually failing on a missing macro instead of the static assert.
This commit is contained in:
parent
131d446183
commit
8eaad79de7
@ -9,7 +9,7 @@ set(CMAKE_REQUIRED_FLAGS ${CPP11_FLAG})
|
||||
function (generate_source result fragment)
|
||||
set(${result} "
|
||||
#define FMT_HEADER_ONLY 1
|
||||
#include \"fmt/format.h\"
|
||||
#include \"fmt/posix.h\"
|
||||
int main() {
|
||||
${fragment}
|
||||
}
|
||||
@ -63,6 +63,7 @@ expect_compile_error("fmt::MemoryWriter() << fmt::pad(42, 5, L' ');")
|
||||
# Formatting a wide character with a narrow format string is forbidden.
|
||||
expect_compile_error("fmt::format(\"{}\", L'a';")
|
||||
|
||||
expect_compile("FMT_STATIC_ASSERT(true, \"this should never happen\");")
|
||||
expect_compile_error("FMT_STATIC_ASSERT(0 > 1, \"oops\");")
|
||||
|
||||
# Make sure that compiler features detected in the header
|
||||
|
Loading…
Reference in New Issue
Block a user