Commit 8b76e970 authored by Victor Zverovich's avatar Victor Zverovich

Support compilation with exceptions disabled

parent 55c61d1a
This diff is collapsed.
...@@ -58,6 +58,14 @@ if (HAVE_OPEN) ...@@ -58,6 +58,14 @@ if (HAVE_OPEN)
add_test(posix-test posix-test) add_test(posix-test posix-test)
endif () endif ()
# Test that the library can be compiled with exceptions disabled.
check_cxx_compiler_flag(-fno-exceptions HAVE_FNO_EXCEPTIONS_FLAG)
if (HAVE_FNO_EXCEPTIONS_FLAG)
add_library(noexception-test ../format.cc)
set_target_properties(noexception-test
PROPERTIES COMPILE_FLAGS -fno-exceptions)
endif ()
add_test(compile-test ${CMAKE_CTEST_COMMAND} add_test(compile-test ${CMAKE_CTEST_COMMAND}
--build-and-test --build-and-test
"${CMAKE_CURRENT_SOURCE_DIR}/compile-test" "${CMAKE_CURRENT_SOURCE_DIR}/compile-test"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment