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.
This commit is contained in:
Victor Zverovich 2016-05-22 16:07:50 -07:00
parent e2a332e5df
commit e160c2b79a
8 changed files with 9 additions and 7 deletions

View File

@ -20,7 +20,7 @@ if (FMT_PEDANTIC)
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS}) target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif () endif ()
target_include_directories(fmt INTERFACE target_include_directories(fmt PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)

View File

@ -25,7 +25,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "format.h" #include "fmt/format.h"
#include <string.h> #include <string.h>

View File

@ -25,7 +25,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "ostream.h" #include "fmt/ostream.h"
namespace fmt { namespace fmt {

View File

@ -28,7 +28,7 @@
#ifndef FMT_OSTREAM_H_ #ifndef FMT_OSTREAM_H_
#define FMT_OSTREAM_H_ #define FMT_OSTREAM_H_
#include "format.h" #include "fmt/format.h"
#include <ostream> #include <ostream>
namespace fmt { namespace fmt {

View File

@ -30,7 +30,7 @@
# define _CRT_SECURE_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS
#endif #endif
#include "posix.h" #include "fmt/posix.h"
#include <limits.h> #include <limits.h>
#include <sys/types.h> #include <sys/types.h>

View File

@ -45,7 +45,7 @@
# include <xlocale.h> // for LC_NUMERIC_MASK on OS X # include <xlocale.h> // for LC_NUMERIC_MASK on OS X
#endif #endif
#include "format.h" #include "fmt/format.h"
#ifndef FMT_POSIX #ifndef FMT_POSIX
# if defined(_WIN32) && !defined(__MINGW32__) # if defined(_WIN32) && !defined(__MINGW32__)

View File

@ -10,7 +10,7 @@
#ifndef FMT_STRING_H_ #ifndef FMT_STRING_H_
#define FMT_STRING_H_ #define FMT_STRING_H_
#include "format.h" #include "fmt/format.h"
namespace fmt { namespace fmt {

View File

@ -111,6 +111,7 @@ endif ()
check_cxx_compiler_flag(-fno-exceptions HAVE_FNO_EXCEPTIONS_FLAG) check_cxx_compiler_flag(-fno-exceptions HAVE_FNO_EXCEPTIONS_FLAG)
if (HAVE_FNO_EXCEPTIONS_FLAG) if (HAVE_FNO_EXCEPTIONS_FLAG)
add_library(noexception-test ../fmt/format.cc) add_library(noexception-test ../fmt/format.cc)
target_include_directories(noexception-test PRIVATE ${PROJECT_SOURCE_DIR})
target_compile_options(noexception-test PRIVATE -fno-exceptions) target_compile_options(noexception-test PRIVATE -fno-exceptions)
endif () endif ()
@ -118,6 +119,7 @@ if (FMT_PEDANTIC)
# Test that the library compiles without windows.h. # Test that the library compiles without windows.h.
if (CMAKE_SYSTEM_NAME STREQUAL "Windows") if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_library(no-windows-h-test ../fmt/format.cc) 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) target_compile_definitions(no-windows-h-test PRIVATE FMT_USE_WINDOWS_H=0)
endif () endif ()