Only run compile-test if FMT_EXTRA_TESTS is set

These tests can be quite time-consuming especially on Windows
This commit is contained in:
vitaut 2015-05-11 07:34:07 -07:00
parent 0e5c8e5395
commit 2da08f21dd

View File

@ -82,9 +82,11 @@ if (HAVE_FNO_EXCEPTIONS_FLAG)
PROPERTIES COMPILE_FLAGS -fno-exceptions)
endif ()
add_test(compile-test ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMAKE_CURRENT_SOURCE_DIR}/compile-test"
"${CMAKE_CURRENT_BINARY_DIR}/compile-test"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM})
if (FMT_EXTRA_TESTS)
add_test(compile-test ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMAKE_CURRENT_SOURCE_DIR}/compile-test"
"${CMAKE_CURRENT_BINARY_DIR}/compile-test"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM})
endif ()