Don't use windows.h if FMT_USE_WINDOWS_H is set to 0

This commit is contained in:
vitaut
2015-06-12 07:15:57 -07:00
parent 9d09214e7a
commit 24c309fbfa
3 changed files with 48 additions and 38 deletions

View File

@@ -89,4 +89,9 @@ if (FMT_PEDANTIC)
"${CMAKE_CURRENT_BINARY_DIR}/compile-test"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM})
# Test that the library compiles without windows.h.
add_library(no-windows-h-test ../format.cc)
set_target_properties(no-windows-h-test
PROPERTIES COMPILE_DEFINITIONS "FMT_USE_WINDOWS_H=0")
endif ()