fmt/test/CMakeLists.txt

14 lines
428 B
CMake
Raw Normal View History

2014-01-02 19:31:53 +00:00
# Test if compile errors are produced where necessary.
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/..)
2014-01-02 19:34:58 +00:00
# Writing a wide character to a character stream Writer is forbidden.
2014-01-02 19:31:53 +00:00
check_cxx_source_compiles("
#include \"format.cc\"
int main() { fmt::Writer() << L'a'; }
" WRITE_WCHAR_COMPILES)
if (WRITE_WCHAR_COMPILES)
error("No compile error for: fmt::Writer() << L'a'")
endif ()