Move source files to the src directory
This commit is contained in:
+4
-4
@@ -73,7 +73,7 @@ function(add_fmt_test name)
|
||||
add_fmt_executable(${name} ${name}.cc ${ARGN})
|
||||
target_link_libraries(${name} test-main)
|
||||
|
||||
# define if certain c++ features can be used
|
||||
# Define if certain C++ features can be used.
|
||||
target_compile_definitions(${name} PRIVATE
|
||||
FMT_USE_TYPE_TRAITS=$<BOOL:${SUPPORTS_TYPE_TRAITS}>
|
||||
FMT_USE_ENUM_BASE=$<BOOL:${SUPPORTS_ENUM_BASE}>)
|
||||
@@ -101,7 +101,7 @@ endif ()
|
||||
|
||||
if (HAVE_OPEN)
|
||||
add_fmt_executable(posix-mock-test
|
||||
posix-mock-test.cc ../include/fmt/format.cc ${TEST_MAIN_SRC})
|
||||
posix-mock-test.cc ../src/format.cc ${TEST_MAIN_SRC})
|
||||
target_include_directories(
|
||||
posix-mock-test PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||
target_compile_definitions(posix-mock-test PRIVATE FMT_USE_FILE_DESCRIPTORS=1)
|
||||
@@ -124,7 +124,7 @@ 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 ../include/fmt/format.cc)
|
||||
add_library(noexception-test ../src/format.cc)
|
||||
target_compile_options(noexception-test PUBLIC ${CPP14_FLAG})
|
||||
target_include_directories(
|
||||
noexception-test PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||
@@ -134,7 +134,7 @@ endif ()
|
||||
if (FMT_PEDANTIC)
|
||||
# Test that the library compiles without windows.h.
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
add_library(no-windows-h-test ../include/fmt/format.cc)
|
||||
add_library(no-windows-h-test ../src/format.cc)
|
||||
target_compile_options(no-windows-h-test PUBLIC ${CPP14_FLAG})
|
||||
target_include_directories(
|
||||
no-windows-h-test PRIVATE ${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "test-assert.h"
|
||||
|
||||
// Include format.cc instead of format.h to test implementation.
|
||||
#include "fmt/format.cc"
|
||||
#include "../src/format.cc"
|
||||
#include "fmt/printf.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
+2
-1
@@ -1637,7 +1637,7 @@ TEST(FormatTest, OutputIterators) {
|
||||
}
|
||||
|
||||
TEST(FormatTest, OutputSize) {
|
||||
EXPECT_EQ(2, fmt::count("{}", 42));
|
||||
EXPECT_EQ(2u, fmt::count("{}", 42));
|
||||
}
|
||||
|
||||
#if FMT_USE_CONSTEXPR
|
||||
@@ -1974,3 +1974,4 @@ TEST(FormatTest, FormatStringErrors) {
|
||||
int, int);
|
||||
}
|
||||
#endif // FMT_USE_CONSTEXPR
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "posix-mock.h"
|
||||
#include "fmt/posix.cc"
|
||||
#include "../src/posix.cc"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
Reference in New Issue
Block a user