From afd67497deba09b4890339a6349bab24b0ecdb1c Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 24 Apr 2016 09:06:12 -0700 Subject: [PATCH] cppformat -> fmt --- CMakeLists.txt | 2 +- {cppformat => fmt}/CMakeLists.txt | 0 {cppformat => fmt}/format.cc | 0 {cppformat => fmt}/format.h | 0 {cppformat => fmt}/posix.cc | 0 {cppformat => fmt}/posix.h | 0 test/CMakeLists.txt | 6 +++--- test/add-subdirectory-test/main.cc | 2 +- test/assert-test.cc | 2 +- test/compile-test/CMakeLists.txt | 2 +- test/find-package-test/main.cc | 2 +- test/format-impl-test.cc | 2 +- test/format-test.cc | 2 +- test/gtest-extra.h | 4 ++-- test/header-only-test.cc | 29 ++--------------------------- test/header-only-test2.cc | 29 ++--------------------------- test/macro-test.cc | 2 +- test/posix-mock-test.cc | 2 +- test/posix-test.cc | 2 +- test/printf-test.cc | 2 +- test/util-test.cc | 2 +- test/util.h | 2 +- 22 files changed, 22 insertions(+), 72 deletions(-) rename {cppformat => fmt}/CMakeLists.txt (100%) rename {cppformat => fmt}/format.cc (100%) rename {cppformat => fmt}/format.h (100%) rename {cppformat => fmt}/posix.cc (100%) rename {cppformat => fmt}/posix.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 947df8d1..2833aa39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ else () check_symbol_exists(open fcntl.h HAVE_OPEN) endif () -add_subdirectory(cppformat) +add_subdirectory(fmt) if (FMT_DOC) add_subdirectory(doc) diff --git a/cppformat/CMakeLists.txt b/fmt/CMakeLists.txt similarity index 100% rename from cppformat/CMakeLists.txt rename to fmt/CMakeLists.txt diff --git a/cppformat/format.cc b/fmt/format.cc similarity index 100% rename from cppformat/format.cc rename to fmt/format.cc diff --git a/cppformat/format.h b/fmt/format.h similarity index 100% rename from cppformat/format.h rename to fmt/format.h diff --git a/cppformat/posix.cc b/fmt/posix.cc similarity index 100% rename from cppformat/posix.cc rename to fmt/posix.cc diff --git a/cppformat/posix.h b/fmt/posix.h similarity index 100% rename from cppformat/posix.h rename to fmt/posix.h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 712fb57c..3eb5e907 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -86,7 +86,7 @@ if (FMT_PEDANTIC AND MSVC) endif () if (HAVE_OPEN) - add_executable(posix-mock-test posix-mock-test.cc ../cppformat/format.cc ${TEST_MAIN_SRC}) + add_executable(posix-mock-test posix-mock-test.cc ../fmt/format.cc ${TEST_MAIN_SRC}) target_include_directories(posix-mock-test PRIVATE ${PROJECT_SOURCE_DIR}) target_compile_definitions(posix-mock-test PRIVATE FMT_USE_FILE_DESCRIPTORS=1) target_link_libraries(posix-mock-test gmock) @@ -107,14 +107,14 @@ 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 ../cppformat/format.cc) + add_library(noexception-test ../fmt/format.cc) target_compile_options(noexception-test PRIVATE -fno-exceptions) endif () if (FMT_PEDANTIC) # Test that the library compiles without windows.h. if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - add_library(no-windows-h-test ../cppformat/format.cc) + add_library(no-windows-h-test ../fmt/format.cc) target_compile_definitions(no-windows-h-test PRIVATE FMT_USE_WINDOWS_H=0) endif () diff --git a/test/add-subdirectory-test/main.cc b/test/add-subdirectory-test/main.cc index b1f13370..f39f377c 100644 --- a/test/add-subdirectory-test/main.cc +++ b/test/add-subdirectory-test/main.cc @@ -1,4 +1,4 @@ -#include "cppformat/format.h" +#include "fmt/format.h" int main(int argc, char** argv) { for(int i = 0; i < argc; ++i) diff --git a/test/assert-test.cc b/test/assert-test.cc index d9167fac..eef342ee 100644 --- a/test/assert-test.cc +++ b/test/assert-test.cc @@ -25,7 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "cppformat/format.h" +#include "fmt/format.h" #include "gtest/gtest.h" #if GTEST_HAS_DEATH_TEST diff --git a/test/compile-test/CMakeLists.txt b/test/compile-test/CMakeLists.txt index 4ae816f3..7de4d82c 100644 --- a/test/compile-test/CMakeLists.txt +++ b/test/compile-test/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/../..) function (generate_source result fragment) set(${result} " #define FMT_HEADER_ONLY 1 - #include \"cppformat/format.h\" + #include \"fmt/format.h\" int main() { ${fragment} } diff --git a/test/find-package-test/main.cc b/test/find-package-test/main.cc index b1f13370..f39f377c 100644 --- a/test/find-package-test/main.cc +++ b/test/find-package-test/main.cc @@ -1,4 +1,4 @@ -#include "cppformat/format.h" +#include "fmt/format.h" int main(int argc, char** argv) { for(int i = 0; i < argc; ++i) diff --git a/test/format-impl-test.cc b/test/format-impl-test.cc index 05a5bcdd..85e1de32 100644 --- a/test/format-impl-test.cc +++ b/test/format-impl-test.cc @@ -29,7 +29,7 @@ #include "test-assert.h" // Include format.cc instead of format.h to test implementation-specific stuff. -#include "cppformat/format.cc" +#include "fmt/format.cc" #include #include diff --git a/test/format-test.cc b/test/format-test.cc index b15c8aac..22b71f3d 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -46,7 +46,7 @@ // Test that the library compiles if None is defined to 0 as done by xlib.h. #define None 0 -#include "cppformat/format.h" +#include "fmt/format.h" #include "util.h" #include "mock-allocator.h" #include "gtest-extra.h" diff --git a/test/gtest-extra.h b/test/gtest-extra.h index 10b2bdea..649fbe27 100644 --- a/test/gtest-extra.h +++ b/test/gtest-extra.h @@ -31,14 +31,14 @@ #include #include -#include "cppformat/format.h" +#include "fmt/format.h" #ifndef FMT_USE_FILE_DESCRIPTORS # define FMT_USE_FILE_DESCRIPTORS 0 #endif #if FMT_USE_FILE_DESCRIPTORS -# include "cppformat/posix.h" +# include "fmt/posix.h" #endif #define FMT_TEST_THROW_(statement, expected_exception, expected_message, fail) \ diff --git a/test/header-only-test.cc b/test/header-only-test.cc index 5a16ffda..df242033 100644 --- a/test/header-only-test.cc +++ b/test/header-only-test.cc @@ -1,28 +1,3 @@ -/* - Header-only configuration test +// Header-only configuration test - Copyright (c) 2014, Victor Zverovich - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "cppformat/format.h" +#include "fmt/format.h" diff --git a/test/header-only-test2.cc b/test/header-only-test2.cc index b54ae4b8..305c6415 100644 --- a/test/header-only-test2.cc +++ b/test/header-only-test2.cc @@ -1,28 +1,3 @@ -/* - Additional translation unit for the header-only configuration test +// Additional translation unit for the header-only configuration test - Copyright (c) 2014, Victor Zverovich - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "cppformat/format.h" +#include "fmt/format.h" diff --git a/test/macro-test.cc b/test/macro-test.cc index ec8c15df..f6763eae 100644 --- a/test/macro-test.cc +++ b/test/macro-test.cc @@ -29,7 +29,7 @@ #include #define FMT_USE_VARIADIC_TEMPLATES 0 -#include "cppformat/format.h" +#include "fmt/format.h" #define IDENTITY(x) x diff --git a/test/posix-mock-test.cc b/test/posix-mock-test.cc index fe131dea..2a89a822 100644 --- a/test/posix-mock-test.cc +++ b/test/posix-mock-test.cc @@ -29,7 +29,7 @@ #define _CRT_SECURE_NO_WARNINGS #include "posix-mock.h" -#include "cppformat/posix.cc" +#include "fmt/posix.cc" #include #include diff --git a/test/posix-test.cc b/test/posix-test.cc index 7fe78e40..2dd3f046 100644 --- a/test/posix-test.cc +++ b/test/posix-test.cc @@ -28,8 +28,8 @@ #include // std::exit #include +#include "fmt/posix.h" #include "gtest-extra.h" -#include "cppformat/posix.h" #include "util.h" #ifdef fileno diff --git a/test/printf-test.cc b/test/printf-test.cc index 76b09fa2..d1023996 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -29,7 +29,7 @@ #include #include -#include "cppformat/format.h" +#include "fmt/format.h" #include "gtest-extra.h" #include "util.h" diff --git a/test/util-test.cc b/test/util-test.cc index 285fbb69..95e1ca70 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -47,7 +47,7 @@ # include #endif -#include "cppformat/format.h" +#include "fmt/format.h" #undef max diff --git a/test/util.h b/test/util.h index 7a51c60b..ceee4202 100644 --- a/test/util.h +++ b/test/util.h @@ -29,7 +29,7 @@ #include #include -#include "cppformat/posix.h" +#include "fmt/posix.h" enum {BUFFER_SIZE = 256};