Commit 32ab64c3 authored by Daniel Black's avatar Daniel Black

MDBF-348: libfmt=system, custom include path

With testing the system libfmt, use the
LIBFMT_INCLUDE_DIR in case the system
include path isn't sufficient.
parent 2407dbbf
......@@ -26,6 +26,7 @@ ENDMACRO()
MACRO (CHECK_LIBFMT)
IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto")
SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES(
"#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1
......@@ -37,6 +38,7 @@ MACRO (CHECK_LIBFMT)
std::cout << fmt::vformat(\"The answer is {}.\",
fmt::format_args(&arg, 1));
}" HAVE_SYSTEM_LIBFMT)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF()
IF(NOT HAVE_SYSTEM_LIBFMT OR WITH_LIBFMT STREQUAL "bundled")
IF (WITH_LIBFMT STREQUAL "system")
......
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