mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-13 07:00:02 +08:00
Add fmt prefix to includes (#332)
Technically it is not necessary, but prevents errors when people add the fmt directory itself rather than its parent to includes. (cherry picked from commit e160c2b79a405757c1a6dab7e5a41b81c9e5ed05)
This commit is contained in:
parent
d5dd1cd2a0
commit
584fa85d18
@ -20,7 +20,7 @@ if (FMT_PEDANTIC)
|
||||
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
|
||||
endif ()
|
||||
|
||||
target_include_directories(fmt INTERFACE
|
||||
target_include_directories(fmt PUBLIC
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "format.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "ostream.h"
|
||||
#include "fmt/ostream.h"
|
||||
|
||||
namespace fmt {
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
#ifndef FMT_OSTREAM_H_
|
||||
#define FMT_OSTREAM_H_
|
||||
|
||||
#include "format.h"
|
||||
#include "fmt/format.h"
|
||||
#include <ostream>
|
||||
|
||||
namespace fmt {
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include "posix.h"
|
||||
#include "fmt/posix.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
# include <xlocale.h> // for LC_NUMERIC_MASK on OS X
|
||||
#endif
|
||||
|
||||
#include "format.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#ifndef FMT_POSIX
|
||||
# if defined(_WIN32) && !defined(__MINGW32__)
|
||||
|
||||
@ -109,6 +109,7 @@ endif ()
|
||||
check_cxx_compiler_flag(-fno-exceptions HAVE_FNO_EXCEPTIONS_FLAG)
|
||||
if (HAVE_FNO_EXCEPTIONS_FLAG)
|
||||
add_library(noexception-test ../fmt/format.cc)
|
||||
target_include_directories(noexception-test PRIVATE ${PROJECT_SOURCE_DIR})
|
||||
target_compile_options(noexception-test PRIVATE -fno-exceptions)
|
||||
endif ()
|
||||
|
||||
@ -116,6 +117,7 @@ if (FMT_PEDANTIC)
|
||||
# Test that the library compiles without windows.h.
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
add_library(no-windows-h-test ../fmt/format.cc)
|
||||
target_include_directories(no-windows-h-test PRIVATE ${PROJECT_SOURCE_DIR})
|
||||
target_compile_definitions(no-windows-h-test PRIVATE FMT_USE_WINDOWS_H=0)
|
||||
endif ()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user