Skip to content

Commit

Permalink
test for gnu++98 instead for c++98 because of mingw ...
Browse files Browse the repository at this point in the history
  • Loading branch information
niosHD committed Feb 3, 2016
1 parent 3133925 commit b09c835
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ if (HAVE_FNO_EXCEPTIONS_FLAG)
endif ()

if (FMT_PEDANTIC)
# syntax test which checks if the library builds in c++98 mode
# syntax test which checks if the library builds in gnu++98 mode
file(GLOB test_src *.cc *.h)
file(GLOB lib_src ../cppformat/*.cc ../cppformat/*.h)
add_library(testformat STATIC ${test_src} ${lib_src})
target_include_directories(testformat PRIVATE .. ../gmock)
target_compile_definitions(testformat PRIVATE
FMT_USE_FILE_DESCRIPTORS=$<BOOL:${HAVE_OPEN}>)
check_cxx_compiler_flag(-std=c++98 HAVE_STD_CPP98_FLAG)
if (HAVE_STD_CPP98_FLAG)
target_compile_options(testformat PRIVATE -std=c++98)
check_cxx_compiler_flag(-std=gnu++98 HAVE_STD_GNUPP98_FLAG)
if (HAVE_STD_GNUPP98_FLAG)
target_compile_options(testformat PRIVATE -std=gnu++98)
endif ()

# Test that the library compiles without windows.h.
Expand Down

0 comments on commit b09c835

Please sign in to comment.