├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── LICENSE ├── README.md ├── Source ├── examples │ ├── assign-base-inaccessible.cpp │ ├── assign-could-not-be-generated.cpp │ ├── automatic-inline.cpp │ ├── behavior-change.cpp │ ├── c++98-compat-pedantic.cpp │ ├── c++98-compat.cpp │ ├── cast-aligned.cpp │ ├── catch-semantic-changed.cpp │ ├── conditional-uninitialized.cpp │ ├── constant-conditional.cpp │ ├── conversion-loss.cpp │ ├── conversion-sign-extended.cpp │ ├── conversion.cpp │ ├── copy-ctor-could-not-be-generated.cpp │ ├── covered-switch-default.cpp │ ├── deprecated-declarations.cpp │ ├── deprecated-register.cpp │ ├── deprecated.cpp │ ├── dflt-ctor-base-inaccessible.cpp │ ├── dflt-ctor-could-not-be-generated.cpp │ ├── digraphs-not-supported.cpp │ ├── documentation-unknown-command.cpp │ ├── documentation.cpp │ ├── extra-semi.cpp │ ├── force-not-inlined.cpp │ ├── global-constructors.cpp │ ├── ill-formed-comma-expr.cpp │ ├── inherits-via-dominance.cpp │ ├── is-defined-to-be.cpp │ ├── layout-changed.cpp │ ├── missing-noreturn.cpp │ ├── name-length-exceeded.cpp │ ├── no-such-warning.cpp │ ├── non-virtual-dtor.cpp │ ├── not-inlined.cpp │ ├── object-layout-change.cpp │ ├── old-style-cast.cpp │ ├── padded.cpp │ ├── shift-sign-overflow.cpp │ ├── sign-compare.cpp │ ├── sign-conversion.cpp │ ├── signed-unsigned-compare.cpp │ ├── static-ctor-not-thread-safe.cpp │ ├── sugar.cmake │ ├── switch-enum.cpp │ ├── switch.cpp │ ├── this-used-in-init.cpp │ ├── undef.cpp │ ├── unreachable-code.cpp │ ├── unreferenced-inline.cpp │ ├── unsafe-conversion.cpp │ ├── unused-parameter.cpp │ ├── unused-value.cpp │ ├── used-but-marked-unused.cpp │ ├── user-ctor-required.cpp │ └── weak-vtables.cpp ├── leathers │ ├── all │ ├── arc-bridge-casts-disallowed-in-nonarc │ ├── arc-repeated-use-of-weak │ ├── assign-base-inaccessible │ ├── assign-could-not-be-generated │ ├── assignment-within-conditional │ ├── automatic-inline │ ├── behavior-change │ ├── bool-conversion │ ├── c++11-extensions │ ├── c++98-compat │ ├── c++98-compat-pedantic │ ├── cast-align │ ├── catch-semantic-changed │ ├── compatibility-c++98 │ ├── conditional-uninitialized │ ├── constant-conditional │ ├── constant-conversion │ ├── conversion │ ├── conversion-loss │ ├── conversion-sign-extended │ ├── copy-ctor-could-not-be-generated │ ├── covered-switch-default │ ├── deprecated │ ├── deprecated-declarations │ ├── deprecated-implementations │ ├── deprecated-objc-isa-usage │ ├── deprecated-register │ ├── dflt-ctor-base-inaccessible │ ├── dflt-ctor-could-not-be-generated │ ├── digraphs-not-supported │ ├── disabled-macro-expansion │ ├── documentation │ ├── documentation-unknown-command │ ├── duplicate-method-match │ ├── empty-body │ ├── enum-conversion │ ├── exit-time-destructors │ ├── explicit-ownership-type │ ├── extra-semi │ ├── force-not-inlined │ ├── format │ ├── four-char-constants │ ├── global-constructors │ ├── ill-formed-comma-expr │ ├── implicit-atomic-properties │ ├── implicit-fallthrough │ ├── implicit-retain-self │ ├── inherits-via-dominance │ ├── inline │ ├── int-conversion │ ├── invalid-offsetof │ ├── is-defined-to-be │ ├── layout-changed │ ├── missing-braces │ ├── missing-field-initializers │ ├── missing-noreturn │ ├── missing-prototypes │ ├── name-length-exceeded │ ├── narrowing │ ├── newline-eof │ ├── no-such-warning │ ├── non-virtual-dtor │ ├── not-inlined │ ├── objc-missing-property-synthesis │ ├── objc-root-class │ ├── object-layout-change │ ├── old-style-cast │ ├── overloaded-virtual │ ├── padded │ ├── parentheses │ ├── pedantic │ ├── pointer-sign │ ├── pop │ ├── protocol │ ├── push │ ├── receiver-is-weak │ ├── return-type │ ├── selector │ ├── shadow │ ├── shift-sign-overflow │ ├── shorten-64-to-32 │ ├── sign-compare │ ├── sign-conversion │ ├── signed-unsigned-compare │ ├── special-members │ ├── static-ctor-not-thread-safe │ ├── strict-selector-match │ ├── sugar.cmake │ ├── switch │ ├── switch-enum │ ├── this-used-in-init │ ├── undeclared-selector │ ├── undef │ ├── uninitialized │ ├── unknown-pragmas │ ├── unreachable-code │ ├── unreachable-code-return │ ├── unreferenced-inline │ ├── unsafe-conversion │ ├── unused-but-set-variable │ ├── unused-function │ ├── unused-label │ ├── unused-parameter │ ├── unused-value │ ├── unused-variable │ ├── used-but-marked-unused │ ├── user-ctor-required │ └── weak-vtables └── sugar.cmake ├── cmake ├── Config.cmake.in └── HunterGate.cmake ├── docs ├── Building-universal-ios-library.md ├── Collecting-sources.md ├── Cross-platform-warning-suppression.md ├── Examples-testing.md ├── Generating-groups.md ├── List.md ├── Pitfalls.md ├── Used-variables.md └── ios-simulator.md ├── expected-warnings ├── clang_libstdcxx.log ├── gcc.log ├── gcc48.log ├── libcxx.log ├── vs32-debug.log ├── vs32-release.log ├── vs64-debug.log ├── vs64-release.log └── xcode.log └── run-test.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Compiled Dynamic libraries 8 | *.so 9 | *.dylib 10 | *.dll 11 | 12 | # Compiled Static libraries 13 | *.lai 14 | *.la 15 | *.a 16 | *.lib 17 | 18 | # Executables 19 | *.exe 20 | *.out 21 | *.app 22 | 23 | # Temp build/install 24 | _builds 25 | _install 26 | run-local.py 27 | 28 | # mac osx 29 | .DS_Store 30 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # OSX/Linux (https://github.com/travis-ci-tester/toolchain-table) 2 | 3 | # Workaround for https://github.com/travis-ci/travis-ci/issues/8363 4 | language: 5 | - minimal 6 | 7 | # Container-based infrastructure (Linux) 8 | # * https://docs.travis-ci.com/user/migrating-from-legacy/#How-can-I-use-container-based-infrastructure%3F 9 | sudo: 10 | - false 11 | 12 | # Install packages differs for container-based infrastructure 13 | # * https://docs.travis-ci.com/user/migrating-from-legacy/#How-do-I-install-APT-sources-and-packages%3F 14 | addons: 15 | apt: 16 | packages: 17 | - python3-pip 18 | 19 | dist: 20 | - trusty 21 | 22 | matrix: 23 | include: 24 | # Linux { 25 | 26 | # Release { 27 | 28 | - os: linux 29 | env: CONFIG=Release TOOLCHAIN=gcc 30 | - os: linux 31 | env: CONFIG=Release TOOLCHAIN=android-ndk-r15c-api-21-armeabi-v7a-neon-clang-libcxx 32 | - os: linux 33 | env: CONFIG=Release TOOLCHAIN=analyze 34 | 35 | # } 36 | 37 | # Debug { 38 | 39 | - os: linux 40 | env: CONFIG=Debug TOOLCHAIN=gcc 41 | - os: linux 42 | env: CONFIG=Debug TOOLCHAIN=android-ndk-r15c-api-21-armeabi-v7a-neon-clang-libcxx 43 | - os: linux 44 | env: CONFIG=Debug TOOLCHAIN=analyze 45 | 46 | # } 47 | 48 | # } 49 | 50 | # OSX { 51 | 52 | # Release { 53 | 54 | - os: osx 55 | env: CONFIG=Release TOOLCHAIN=libcxx 56 | - os: osx 57 | env: CONFIG=Release TOOLCHAIN=osx-10-11 58 | - os: osx 59 | env: CONFIG=Release TOOLCHAIN=ios-nocodesign-9-3 60 | 61 | # } 62 | 63 | # Debug { 64 | 65 | - os: osx 66 | env: CONFIG=Debug TOOLCHAIN=libcxx 67 | - os: osx 68 | env: CONFIG=Debug TOOLCHAIN=osx-10-11 69 | - os: osx 70 | env: CONFIG=Debug TOOLCHAIN=ios-nocodesign-9-3 71 | 72 | # } 73 | 74 | # } 75 | 76 | install: 77 | # Info about OS 78 | - uname -a 79 | 80 | # Disable autoupdate 81 | # * https://github.com/Homebrew/brew/blob/7d31a70373edae4d8e78d91a4cbc05324bebc3ba/Library/Homebrew/manpages/brew.1.md.erb#L202 82 | - export HOMEBREW_NO_AUTO_UPDATE=1 83 | 84 | # Install Python 3 85 | - if [[ "`uname`" == "Darwin" ]]; then travis_retry brew install python3; fi 86 | 87 | # Install Python package 'requests' 88 | # 'easy_install3' is not installed by 'brew install python3' on OS X 10.9 Maverick 89 | - if [[ "`uname`" == "Darwin" ]]; then pip3 install requests; fi 90 | - if [[ "`uname`" == "Linux" ]]; then travis_retry pip3 install --user requests; fi 91 | 92 | # Install latest Polly toolchains and scripts 93 | - wget https://github.com/ruslo/polly/archive/master.zip 94 | - unzip master.zip 95 | - export POLLY_ROOT="`pwd`/polly-master" 96 | - export PATH="${POLLY_ROOT}/bin:${PATH}" 97 | 98 | # Install dependencies (CMake, Android NDK) 99 | - install-ci-dependencies.py 100 | 101 | # Tune locations 102 | - export PATH="`pwd`/_ci/cmake/bin:${PATH}" 103 | 104 | # Installed if toolchain is Android (otherwise directory doesn't exist) 105 | - export ANDROID_NDK_r10e="`pwd`/_ci/android-ndk-r10e" 106 | - export ANDROID_NDK_r11c="`pwd`/_ci/android-ndk-r11c" 107 | - export ANDROID_NDK_r15c="`pwd`/_ci/android-ndk-r15c" 108 | 109 | script: 110 | - python3 ./run-test.py --toolchain ${TOOLCHAIN} --type ${CONFIG} 111 | 112 | # https://docs.travis-ci.com/user/customizing-the-build/#Whitelisting-or-blacklisting-branches 113 | # Exclude branch 'pkg.template'. Nothing to build there. 114 | branches: 115 | except: 116 | - /^pr\..*/ 117 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2015, Ruslan Baratov 2 | # All rights reserved. 3 | 4 | cmake_minimum_required(VERSION 3.0) 5 | 6 | ### Hunter snapshot that will be used ### 7 | include("cmake/HunterGate.cmake") 8 | HunterGate( 9 | URL "https://github.com/ruslo/hunter/archive/v0.20.64.tar.gz" 10 | SHA1 "7b830dfda7a094b2af15f44b24ebd2489404d880" 11 | ) 12 | 13 | project(Leathers VERSION 0.2.0) 14 | 15 | ### Build Options ### 16 | option(LEATHERS_BUILD_EXAMPLES "Build examples" OFF) 17 | option( 18 | LEATHERS_EXAMPLES_SHOW_WARNINGS 19 | "Disable warning suppression in examples" 20 | OFF 21 | ) 22 | 23 | ### Download dependencies ### 24 | hunter_add_package(Boost) 25 | hunter_add_package(sugar) 26 | 27 | ### Find dependencies ### 28 | find_package(Boost CONFIG REQUIRED) 29 | find_package(sugar CONFIG REQUIRED) 30 | 31 | ### Target sources. Init variables: ### 32 | # LEATHERS_SOURCES 33 | # LEATHERS_EXAMPLES_SOURCES 34 | sugar_include("./Source") 35 | 36 | ### Global include 37 | include_directories("Source") 38 | 39 | ### Targets ### 40 | add_library(leathers INTERFACE) 41 | 42 | target_link_libraries(leathers INTERFACE Boost::boost) 43 | 44 | if(LEATHERS_BUILD_EXAMPLES) 45 | include(sugar_generate_warning_flags) 46 | include(sugar_groups_generate) 47 | 48 | if(LEATHERS_EXAMPLES_SHOW_WARNINGS) 49 | set(treat_as_error "") 50 | else() 51 | set(treat_as_error ALL) 52 | endif() 53 | 54 | sugar_generate_warning_flags( 55 | target_compile_options 56 | target_properties 57 | DISABLE 58 | unreferenced-inline # https://github.com/ruslo/leathers/issues/1 59 | name-length-exceeded # https://github.com/ruslo/leathers/issues/2 60 | not-inlined # https://github.com/ruslo/leathers/issues/3 61 | force-not-inlined # https://github.com/ruslo/leathers/issues/4 62 | ENABLE ALL 63 | TREAT_AS_ERROR ${treat_as_error} 64 | CLEAR_GLOBAL 65 | ) 66 | 67 | foreach(src ${LEATHERS_EXAMPLES_SOURCES}) 68 | get_filename_component(test_name "${src}" NAME_WE) 69 | set(sources ${src} ${LEATHERS_SOURCES} ${SUGAR_SOURCES}) 70 | add_executable(example_${test_name} ${sources}) 71 | if(LEATHERS_EXAMPLES_SHOW_WARNINGS) 72 | target_compile_definitions(example_${test_name} PUBLIC SHOW_WARNINGS) 73 | endif() 74 | set_target_properties( 75 | example_${test_name} 76 | PROPERTIES 77 | ${target_properties} 78 | COMPILE_OPTIONS 79 | "${target_compile_options}" 80 | ) 81 | target_link_libraries(example_${test_name} leathers) 82 | endforeach() 83 | 84 | sugar_groups_generate( 85 | ${LEATHERS_EXAMPLES_SOURCES} ${LEATHERS_SOURCES} ${SUGAR_SOURCES} 86 | ) 87 | endif() 88 | 89 | # Installation (https://github.com/forexample/package-example) { 90 | 91 | set(config_install_dir "lib/cmake/${PROJECT_NAME}") 92 | set(include_install_dir "include") 93 | 94 | set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") 95 | 96 | set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") 97 | set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") 98 | set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") 99 | set(namespace "${PROJECT_NAME}::") 100 | 101 | include(CMakePackageConfigHelpers) 102 | 103 | # Use: 104 | # * PROJECT_VERSION 105 | write_basic_package_version_file( 106 | "${version_config}" COMPATIBILITY SameMajorVersion 107 | ) 108 | 109 | # Use: 110 | # * 'TARGETS_EXPORT_NAME' 111 | configure_package_config_file( 112 | "cmake/Config.cmake.in" 113 | "${project_config}" 114 | INSTALL_DESTINATION "${config_install_dir}" 115 | ) 116 | 117 | install( 118 | TARGETS leathers 119 | EXPORT "${TARGETS_EXPORT_NAME}" 120 | INCLUDES DESTINATION "${include_install_dir}" 121 | ) 122 | 123 | install( 124 | DIRECTORY "Source/leathers" 125 | DESTINATION "${include_install_dir}" 126 | ) 127 | 128 | install( 129 | FILES "${project_config}" "${version_config}" 130 | DESTINATION "${config_install_dir}" 131 | ) 132 | 133 | install( 134 | EXPORT "${TARGETS_EXPORT_NAME}" 135 | NAMESPACE "${namespace}" 136 | DESTINATION "${config_install_dir}" 137 | ) 138 | 139 | # } 140 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Ruslan Baratov 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | leathers 2 | ======== 3 | 4 | This C++ header only library helps to save some space while ignoring 5 | compiler warnings by pragma pop/push mechanism. 6 | 7 | ### Example 8 | Some mix-compiler code: 9 | 10 | ```cpp 11 | #if defined(BOOST_MSVC) 12 | # pragma warning(push) 13 | # pragma warning(disable : 4511 4512) 14 | #elif defined(BOOST_CLANG) 15 | # pragma clang diagnostic push 16 | # pragma clang diagnostic ignored "-Wexit-time-destructors" 17 | #endif 18 | // some code 19 | #if defined(BOOST_MSVC) 20 | # pragma warning(pop) 21 | #elif defined(BOOST_CLANG) 22 | # pragma clang diagnostic pop 23 | #endif 24 | ``` 25 | 26 | 12 lines of code for 2 compilers to ignore warning in 1 line. 27 | 28 | Using this library: 29 | 30 | ```cpp 31 | #include 32 | #include 33 | // some code 34 | #include 35 | ``` 36 | 37 | 3 lines of code for **any** number of compilers to ignore warning in 1 line. 38 | 39 | ### Example (all) 40 | 41 | Suppressing warnings in third party libraries: 42 | 43 | ```cpp 44 | #include 45 | #include 46 | # include 47 | # include 48 | #include 49 | ``` 50 | 51 | ### Usage (manual install) 52 | 53 | * Install `boost` (`predef` library) 54 | * Add `Source` directory to compiler include option: `-I${LEATHERS_ROOT}/Source` 55 | ```bash 56 | > cat foo.cpp 57 | #include // std::printf 58 | 59 | int main() { 60 | const char* fmt = "%d"; 61 | 62 | #include 63 | #include 64 | std::printf(fmt, 1); 65 | #include 66 | } 67 | > clang++ -I${BOOST_ROOT}/include -I${LEATHERS_ROOT}/Source -Weverything foo.cpp 68 | ``` 69 | 70 | ### Usage (CMake, hunter package manager) 71 | `Leathers` can be installed using [hunter](https://github.com/ruslo/hunter) package manager: 72 | ```bash 73 | > cat CMakeLists.txt 74 | cmake_minimum_required(VERSION 3.0) 75 | project(Foo) 76 | 77 | include(HunterGate.cmake) 78 | hunter_add_package(Leathers) 79 | 80 | find_package(Leathers CONFIG REQUIRED) 81 | 82 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Werror") 83 | 84 | add_executable(foo foo.cpp) 85 | target_link_libraries(foo leathers) 86 | > cat foo.cpp 87 | #include // std::printf 88 | 89 | int main() { 90 | const char* fmt = "%d"; 91 | 92 | #include 93 | #include 94 | std::printf(fmt, 1); 95 | #include 96 | } 97 | > cmake -H. -B_builds -DHUNTER_STATUS_DEBUG=ON 98 | > cmake --build _builds 99 | ``` 100 | 101 | *Note* that boost installed automatically 102 | 103 | ### CMake (companion function to generate warning flags) 104 | [This][2] function can be used to generate cross-platform target flags and properties: 105 | ```bash 106 | > cat CMakeLists.txt 107 | cmake_minimum_required(VERSION 3.0) 108 | project(Foo) 109 | 110 | include(HunterGate.cmake) 111 | hunter_add_package(Leathers) 112 | hunter_add_package(Sugar) 113 | 114 | find_package(Leathers CONFIG REQUIRED) 115 | include(${SUGAR_ROOT}/cmake/Sugar) 116 | include(sugar_generate_warning_flags) 117 | 118 | sugar_generate_warning_flags( 119 | flags properties ENABLE ALL TREAT_AS_ERROR ALL CLEAR_GLOBAL 120 | ) 121 | 122 | add_executable(foo foo.cpp) 123 | target_link_libraries(foo leathers) 124 | 125 | set_target_properties( 126 | foo PROPERTIES ${properties} COMPILE_OPTIONS "${flags}" 127 | ) 128 | > cat foo.cpp 129 | #include // std::printf 130 | 131 | int main() { 132 | const char* fmt = "%d"; 133 | 134 | #include 135 | #include 136 | std::printf(fmt, 1); 137 | #include 138 | } 139 | > cmake -H. -B_builds -DHUNTER_STATUS_DEBUG=ON 140 | > cmake --build _builds 141 | ``` 142 | 143 | ### Wiki 144 | * [warnings list](https://github.com/ruslo/leathers/wiki/List) 145 | * [pitfalls](https://github.com/ruslo/leathers/wiki/Pitfalls) 146 | 147 | [1]: https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 148 | [2]: https://github.com/ruslo/sugar/tree/master/cmake/core#sugar_generate_warning_flags 149 | -------------------------------------------------------------------------------- /Source/examples/assign-base-inaccessible.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class Foo { 5 | public: 6 | #include 7 | #include 8 | Foo& operator=(const Foo&) = delete; 9 | #include 10 | }; 11 | 12 | #include 13 | #if !defined(SHOW_WARNINGS) 14 | # include 15 | #endif 16 | class Boo: public Foo { 17 | }; 18 | #include 19 | 20 | int main() { 21 | } 22 | -------------------------------------------------------------------------------- /Source/examples/assign-could-not-be-generated.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | class Boo { 9 | public: 10 | Boo(); 11 | 12 | private: 13 | const int a_; 14 | }; 15 | #include 16 | 17 | int main() { 18 | } 19 | -------------------------------------------------------------------------------- /Source/examples/automatic-inline.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | // Visual Studio release build 5 | 6 | void foo(); 7 | 8 | #include 9 | #if !defined(SHOW_WARNINGS) 10 | # include 11 | #endif 12 | void foo() { 13 | } 14 | #include 15 | 16 | int main() { 17 | foo(); 18 | } 19 | -------------------------------------------------------------------------------- /Source/examples/behavior-change.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class A { 5 | }; 6 | 7 | class B { 8 | public: 9 | B(B&) { 10 | } 11 | 12 | B(A) { 13 | } 14 | 15 | operator A() { 16 | return A(); 17 | } 18 | }; 19 | 20 | inline B source() { 21 | return A(); 22 | } 23 | 24 | int main() { 25 | #include 26 | #if !defined(SHOW_WARNINGS) 27 | # include 28 | #endif 29 | B ap(source()); 30 | #include 31 | } 32 | -------------------------------------------------------------------------------- /Source/examples/c++98-compat-pedantic.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | void foo(); 5 | 6 | #include 7 | #include 8 | #if !defined(SHOW_WARNINGS) 9 | # include 10 | #endif 11 | void foo() { 12 | }; 13 | #include 14 | 15 | int main() { 16 | } 17 | -------------------------------------------------------------------------------- /Source/examples/c++98-compat.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | inline namespace Foo {} 9 | #include 10 | 11 | int main() { 12 | } 13 | -------------------------------------------------------------------------------- /Source/examples/cast-aligned.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | char* a = 0; 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | # include 10 | #endif 11 | long* b = (long*)a; 12 | #include 13 | (void)b; 14 | } 15 | -------------------------------------------------------------------------------- /Source/examples/catch-semantic-changed.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | // MSVC flags: EHs 5 | 6 | int main() { 7 | #include 8 | #if !defined(SHOW_WARNINGS) 9 | # include 10 | #endif 11 | try { 12 | } 13 | catch (...) { 14 | } 15 | #include 16 | } 17 | -------------------------------------------------------------------------------- /Source/examples/conditional-uninitialized.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | struct Foo; 5 | 6 | template bool boo(int&) { return false; } 7 | 8 | inline int foo(int arg) { 9 | int result; 10 | bool y = arg && boo(result); 11 | if(!y) throw 1; 12 | #include 13 | #if !defined(SHOW_WARNINGS) 14 | # include 15 | #endif 16 | return result; 17 | #include 18 | } 19 | 20 | int main() { 21 | } 22 | -------------------------------------------------------------------------------- /Source/examples/constant-conditional.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | while (false) { 10 | } 11 | #include 12 | } 13 | -------------------------------------------------------------------------------- /Source/examples/conversion-loss.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | inline int foo() { 5 | return 0; 6 | } 7 | 8 | int main() { 9 | char y; 10 | 11 | #include 12 | #include 13 | #if (BOOST_COMP_MSVC) 14 | # include 15 | #endif 16 | #if !defined(SHOW_WARNINGS) 17 | # include 18 | #endif 19 | y = foo(); 20 | } 21 | #include 22 | -------------------------------------------------------------------------------- /Source/examples/conversion-sign-extended.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include // uint64_t 5 | 6 | uint64_t f(void*); 7 | 8 | #include 9 | #if !defined(SHOW_WARNINGS) 10 | # include 11 | #endif 12 | uint64_t f(void* ptr) { 13 | return reinterpret_cast(ptr); 14 | } 15 | #include 16 | 17 | int main() { 18 | } 19 | -------------------------------------------------------------------------------- /Source/examples/conversion.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | void f(int); 5 | 6 | #include 7 | #include 8 | void f(int) { 9 | } 10 | #include 11 | 12 | int main() { 13 | double x = 1.5; 14 | #include 15 | #if !defined(SHOW_WARNINGS) 16 | # include 17 | #endif 18 | f(x); 19 | #include 20 | } 21 | -------------------------------------------------------------------------------- /Source/examples/copy-ctor-could-not-be-generated.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class Foo { 5 | public: 6 | #include 7 | #include 8 | Foo() = default; 9 | Foo(const Foo&) = delete; 10 | #include 11 | }; 12 | 13 | #include 14 | #if !defined(SHOW_WARNINGS) 15 | # include 16 | #endif 17 | class Boo: public Foo { 18 | }; 19 | #include 20 | 21 | int main() { 22 | } 23 | -------------------------------------------------------------------------------- /Source/examples/covered-switch-default.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | enum Foo { 5 | A, 6 | B, 7 | C 8 | }; 9 | 10 | void foo(Foo a); 11 | 12 | void foo(Foo a) { 13 | switch(a) { 14 | case A: 15 | break; 16 | case B: 17 | break; 18 | case C: 19 | break; 20 | #include 21 | #if !defined(SHOW_WARNINGS) 22 | # include 23 | # include 24 | #endif 25 | default: 26 | break; 27 | #include 28 | } 29 | } 30 | 31 | int main() { 32 | } 33 | -------------------------------------------------------------------------------- /Source/examples/deprecated-declarations.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include // BOOST_COMP_CLANG 5 | 6 | #if (BOOST_COMP_CLANG) || (BOOST_COMP_GNUC) 7 | # define DEPRECATED __attribute__((deprecated("boo"))) 8 | #elif (BOOST_COMP_MSVC) 9 | # define DEPRECATED __declspec(deprecated) 10 | #else 11 | # define DEPRECATED 12 | #endif 13 | 14 | DEPRECATED void foo(); 15 | 16 | #include 17 | #include 18 | void foo() { 19 | } 20 | #include 21 | 22 | int main() { 23 | #include 24 | #if !defined(SHOW_WARNINGS) 25 | # include 26 | #endif 27 | foo(); 28 | # include 29 | } 30 | -------------------------------------------------------------------------------- /Source/examples/deprecated-register.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | register int x = 0; 10 | #include 11 | return x; 12 | } 13 | -------------------------------------------------------------------------------- /Source/examples/deprecated.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | struct Foo { 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | void boo() throw() { 10 | } 11 | #include 12 | }; 13 | 14 | int main() { 15 | } 16 | -------------------------------------------------------------------------------- /Source/examples/dflt-ctor-base-inaccessible.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class Foo { 5 | public: 6 | #include 7 | #include 8 | Foo() = delete; 9 | #include 10 | }; 11 | 12 | #include 13 | #if !defined(SHOW_WARNINGS) 14 | # include 15 | #endif 16 | class Boo: public Foo { 17 | public: 18 | int& a_; 19 | 20 | Boo& operator=(const Boo&); 21 | }; 22 | #include 23 | 24 | int main() { 25 | } 26 | -------------------------------------------------------------------------------- /Source/examples/dflt-ctor-could-not-be-generated.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | class Boo { 10 | public: 11 | int& a_; 12 | 13 | Boo& operator=(const Boo&); 14 | }; 15 | #include 16 | 17 | int main() { 18 | } 19 | -------------------------------------------------------------------------------- /Source/examples/digraphs-not-supported.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | template 5 | class Foo { 6 | }; 7 | 8 | int main() { 9 | #include 10 | #if !defined(SHOW_WARNINGS) 11 | # include 12 | #endif 13 | Foo<::Foo> x; 14 | #include 15 | (void)x; 16 | } 17 | -------------------------------------------------------------------------------- /Source/examples/documentation-unknown-command.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | //! \file 9 | int main() { 10 | } 11 | #include 12 | -------------------------------------------------------------------------------- /Source/examples/documentation.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | /** 9 | * @detail Some details 10 | */ 11 | void foo(int); 12 | #include 13 | 14 | int main() { 15 | } 16 | -------------------------------------------------------------------------------- /Source/examples/extra-semi.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | struct Foo { 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | void foo() { 10 | }; 11 | #include 12 | }; 13 | 14 | int main() { 15 | } 16 | -------------------------------------------------------------------------------- /Source/examples/force-not-inlined.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #if !defined(SHOW_WARNINGS) 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | int main() { 34 | using namespace boost::xpressive; 35 | sregex pat1 = "foo" >> +space >> "bar"; 36 | } 37 | 38 | #include 39 | -------------------------------------------------------------------------------- /Source/examples/global-constructors.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | struct Foo { 5 | Foo() { 6 | } 7 | }; 8 | 9 | extern Foo foo; 10 | 11 | #include 12 | #if !defined(SHOW_WARNINGS) 13 | # include 14 | #endif 15 | Foo foo; 16 | #include 17 | 18 | int main() { 19 | } 20 | -------------------------------------------------------------------------------- /Source/examples/ill-formed-comma-expr.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | bool x(false), y(true); 6 | 7 | #include 8 | #if !defined(SHOW_WARNINGS) 9 | # include 10 | #endif 11 | if (x, y) { 12 | } 13 | #include 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Source/examples/inherits-via-dominance.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | class Foo { 10 | public: 11 | virtual void foo() { 12 | } 13 | 14 | virtual ~Foo() { 15 | } 16 | }; 17 | 18 | class Boo : virtual public Foo { 19 | public: 20 | virtual void foo() override { 21 | } 22 | 23 | virtual ~Boo() override { 24 | } 25 | }; 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #if !defined(SHOW_WARNINGS) 33 | # include 34 | #endif 35 | class Baz : public Boo, virtual public Foo { 36 | virtual ~Baz() override { 37 | } 38 | }; 39 | #include 40 | 41 | int main() { 42 | } 43 | -------------------------------------------------------------------------------- /Source/examples/is-defined-to-be.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #define FOO 0 5 | 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | #endif 10 | 11 | # ifdef FOO 12 | # endif 13 | 14 | #include 15 | 16 | int main() { 17 | } 18 | -------------------------------------------------------------------------------- /Source/examples/layout-changed.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | 10 | class Foo; 11 | 12 | struct Boo { 13 | void (Foo::*mem)(); 14 | void* ptr; 15 | }; 16 | 17 | #include 18 | 19 | int main() { 20 | } 21 | -------------------------------------------------------------------------------- /Source/examples/missing-noreturn.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | void foo(); 5 | 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | #endif 10 | void foo() { 11 | throw -1; 12 | } 13 | #include 14 | 15 | int main() { 16 | } 17 | -------------------------------------------------------------------------------- /Source/examples/name-length-exceeded.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #include 6 | # include 7 | # include 8 | #include 9 | 10 | #include 11 | #include 12 | #if !defined(SHOW_WARNINGS) 13 | # include 14 | #endif 15 | class A1 {}; 16 | 17 | using A2 = std::map; 18 | using A3 = std::map; 19 | using A4 = std::map; 20 | using A5 = std::map; 21 | 22 | int main() { 23 | A5 a; 24 | (void)a; 25 | } 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /Source/examples/no-such-warning.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | 6 | #if (BOOST_COMP_MSVC) 7 | # include 8 | # if !defined(SHOW_WARNINGS) 9 | # include 10 | # endif 11 | # pragma warning(disable: 4675) 12 | # include 13 | #endif 14 | 15 | 16 | int main() { 17 | } 18 | -------------------------------------------------------------------------------- /Source/examples/non-virtual-dtor.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | struct Foo { 9 | virtual void foo() = 0; 10 | ~Foo() {} // For Visual Studio warning 11 | }; 12 | #include 13 | 14 | int main() { 15 | } 16 | -------------------------------------------------------------------------------- /Source/examples/not-inlined.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #include 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | #endif 10 | # include 11 | #include 12 | 13 | int main() { 14 | } 15 | -------------------------------------------------------------------------------- /Source/examples/object-layout-change.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class A { 5 | public: 6 | virtual ~A() {} 7 | }; 8 | 9 | #include 10 | #if !defined(SHOW_WARNINGS) 11 | # include 12 | #endif 13 | class B: public virtual A { 14 | }; 15 | #include 16 | 17 | int main() { 18 | } 19 | -------------------------------------------------------------------------------- /Source/examples/old-style-cast.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | char* a = 0; 6 | 7 | #include 8 | #if !defined(SHOW_WARNINGS) 9 | # include 10 | #endif 11 | char* b = (char*)a; 12 | #include 13 | 14 | (void)b; 15 | } 16 | -------------------------------------------------------------------------------- /Source/examples/padded.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | struct Foo { 5 | char x; 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | #endif 10 | long y; 11 | #include 12 | }; 13 | 14 | int main() { 15 | // struct Foo must be used, otherwise there will be no warning (clang) 16 | return static_cast(Foo().y); 17 | } 18 | -------------------------------------------------------------------------------- /Source/examples/shift-sign-overflow.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | (void)~(static_cast(1) << (8*sizeof(long) - 1)); 10 | #include 11 | } 12 | -------------------------------------------------------------------------------- /Source/examples/sign-compare.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | int a(0); 6 | unsigned b(0); 7 | #include 8 | #if !defined(SHOW_WARNINGS) 9 | # include 10 | #endif 11 | if (a == b) { 12 | } 13 | #include 14 | } 15 | -------------------------------------------------------------------------------- /Source/examples/sign-conversion.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int foo(); 5 | 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | #endif 10 | int foo() { 11 | unsigned x(3); 12 | return x; 13 | } 14 | #include 15 | 16 | int main() { 17 | } 18 | -------------------------------------------------------------------------------- /Source/examples/signed-unsigned-compare.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | #include 6 | #include 7 | int x(1); 8 | unsigned long long y(2); 9 | #include 10 | 11 | #include 12 | #if !defined(SHOW_WARNINGS) 13 | # include 14 | #endif 15 | if (x == y) { 16 | } 17 | #include 18 | } 19 | -------------------------------------------------------------------------------- /Source/examples/static-ctor-not-thread-safe.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class Foo { 5 | public: 6 | Foo() { 7 | } 8 | }; 9 | 10 | int main() { 11 | #include 12 | #if !defined(SHOW_WARNINGS) 13 | # include 14 | #endif 15 | static Foo foo; 16 | #include 17 | } 18 | -------------------------------------------------------------------------------- /Source/examples/sugar.cmake: -------------------------------------------------------------------------------- 1 | # This file generated automatically by: 2 | # generate_sugar_files.py 3 | # see wiki for more info: 4 | # https://github.com/ruslo/sugar/wiki/Collecting-sources 5 | 6 | if(DEFINED LEATHERS_SOURCE_EXAMPLES_SUGAR_CMAKE_) 7 | return() 8 | else() 9 | set(LEATHERS_SOURCE_EXAMPLES_SUGAR_CMAKE_ 1) 10 | endif() 11 | 12 | include(sugar_files) 13 | 14 | sugar_files( 15 | LEATHERS_EXAMPLES_SOURCES 16 | # compatibility-c++98 (see one more below) 17 | c++98-compat-pedantic.cpp 18 | 19 | # special-members 20 | assign-base-inaccessible.cpp 21 | assign-could-not-be-generated.cpp 22 | copy-ctor-could-not-be-generated.cpp 23 | dflt-ctor-could-not-be-generated.cpp 24 | user-ctor-required.cpp 25 | 26 | # inline 27 | automatic-inline.cpp 28 | force-not-inlined.cpp 29 | not-inlined.cpp 30 | unreferenced-inline.cpp 31 | 32 | # 33 | cast-aligned.cpp 34 | catch-semantic-changed.cpp 35 | conditional-uninitialized.cpp 36 | constant-conditional.cpp 37 | conversion-loss.cpp 38 | conversion-sign-extended.cpp 39 | conversion.cpp 40 | covered-switch-default.cpp 41 | deprecated-declarations.cpp 42 | deprecated-register.cpp 43 | deprecated.cpp 44 | documentation-unknown-command.cpp 45 | documentation.cpp 46 | extra-semi.cpp 47 | global-constructors.cpp 48 | ill-formed-comma-expr.cpp 49 | inherits-via-dominance.cpp 50 | is-defined-to-be.cpp 51 | layout-changed.cpp 52 | missing-noreturn.cpp 53 | name-length-exceeded.cpp 54 | no-such-warning.cpp 55 | non-virtual-dtor.cpp 56 | object-layout-change.cpp 57 | old-style-cast.cpp 58 | padded.cpp 59 | shift-sign-overflow.cpp 60 | sign-compare.cpp 61 | signed-unsigned-compare.cpp 62 | sign-conversion.cpp 63 | static-ctor-not-thread-safe.cpp 64 | switch-enum.cpp 65 | switch.cpp 66 | this-used-in-init.cpp 67 | undef.cpp 68 | unreachable-code.cpp 69 | unsafe-conversion.cpp 70 | unused-parameter.cpp 71 | unused-value.cpp 72 | used-but-marked-unused.cpp 73 | weak-vtables.cpp 74 | ) 75 | 76 | if(NOT MSVC) 77 | sugar_files( 78 | LEATHERS_EXAMPLES_SOURCES 79 | c++98-compat.cpp # inline namespaces is not supported 80 | ) 81 | endif() 82 | 83 | if(MSVC) 84 | sugar_files( 85 | LEATHERS_EXAMPLES_SOURCES 86 | behavior-change.cpp 87 | dflt-ctor-base-inaccessible.cpp # clang error 88 | digraphs-not-supported.cpp # clang error 89 | ) 90 | endif() 91 | -------------------------------------------------------------------------------- /Source/examples/switch-enum.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | enum Foo { 5 | A, 6 | B 7 | }; 8 | 9 | void boo(Foo foo); 10 | 11 | void boo(Foo foo) { 12 | #include 13 | #if !defined(SHOW_WARNINGS) 14 | # include 15 | #endif 16 | switch (foo) { 17 | case A: 18 | break; 19 | default: 20 | break; 21 | } 22 | #include 23 | } 24 | 25 | int main() { 26 | } 27 | -------------------------------------------------------------------------------- /Source/examples/switch.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | enum X { 5 | A, 6 | B 7 | }; 8 | 9 | void foo(X x); 10 | 11 | void foo(X x) { 12 | #include 13 | #if !defined(SHOW_WARNINGS) 14 | # include 15 | #endif 16 | switch (x) { 17 | case A: 18 | break; 19 | } 20 | # include 21 | } 22 | 23 | int main() { 24 | } 25 | -------------------------------------------------------------------------------- /Source/examples/this-used-in-init.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class Boo; 5 | 6 | class Foo { 7 | public: 8 | Foo(Boo&) { 9 | } 10 | }; 11 | 12 | class Boo { 13 | public: 14 | #include 15 | #if !defined(SHOW_WARNINGS) 16 | # include 17 | #endif 18 | Boo(): foo_(*this) { 19 | } 20 | #include 21 | 22 | private: 23 | Foo foo_; 24 | }; 25 | 26 | int main() { 27 | } 28 | -------------------------------------------------------------------------------- /Source/examples/undef.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | # if VERY_STRANGE_MACRO 9 | # endif 10 | #include 11 | 12 | int main() { 13 | } 14 | -------------------------------------------------------------------------------- /Source/examples/unreachable-code.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #include 6 | #if !defined(SHOW_WARNINGS) 7 | # include 8 | #endif 9 | int main() { 10 | return 2; 11 | return 1; 12 | } 13 | #include 14 | -------------------------------------------------------------------------------- /Source/examples/unreferenced-inline.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | inline void foo() { 9 | } 10 | // TODO: https://github.com/ruslo/leathers/issues/1 11 | // #include 12 | 13 | int main() { 14 | } 15 | -------------------------------------------------------------------------------- /Source/examples/unsafe-conversion.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | void boo(int); 5 | 6 | void boo(int) { 7 | } 8 | 9 | int main() { 10 | typedef void (*func)(); 11 | 12 | #include 13 | #include 14 | #if !defined(SHOW_WARNINGS) 15 | # include 16 | #endif 17 | func x = (func)boo; 18 | #include 19 | 20 | (void)x; 21 | } 22 | -------------------------------------------------------------------------------- /Source/examples/unused-parameter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | void foo(int); 5 | 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | #endif 10 | void foo(int a) { 11 | } 12 | #include 13 | 14 | int main() { 15 | } 16 | -------------------------------------------------------------------------------- /Source/examples/unused-value.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | int main() { 5 | int x(0); 6 | #include 7 | #if !defined(SHOW_WARNINGS) 8 | # include 9 | #endif 10 | x; 11 | #include 12 | } 13 | -------------------------------------------------------------------------------- /Source/examples/used-but-marked-unused.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | # include 4 | #include 5 | 6 | #if (BOOST_COMP_CLANG) || (BOOST_COMP_GNUC) 7 | # define UNUSED __attribute__((unused)) 8 | #else 9 | # define UNUSED 10 | #endif 11 | 12 | struct Foo { 13 | } UNUSED; 14 | 15 | int main() { 16 | #include 17 | #if !defined(SHOW_WARNINGS) 18 | # include 19 | #endif 20 | Foo foo; 21 | (void)foo; 22 | #include 23 | } 24 | -------------------------------------------------------------------------------- /Source/examples/user-ctor-required.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | class Foo { 5 | public: 6 | Foo(int); 7 | }; 8 | 9 | #include 10 | #include 11 | #if !defined(SHOW_WARNINGS) 12 | # include 13 | #endif 14 | class Boo { 15 | public: 16 | int& a_; 17 | 18 | Boo& operator=(const Boo&); 19 | }; 20 | #include 21 | 22 | int main() { 23 | } 24 | -------------------------------------------------------------------------------- /Source/examples/weak-vtables.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Ruslan Baratov 2 | // All rights reserved. 3 | 4 | #include 5 | #if !defined(SHOW_WARNINGS) 6 | # include 7 | #endif 8 | class Foo { 9 | public: 10 | virtual void foo() { 11 | } 12 | 13 | virtual ~Foo() { 14 | } 15 | }; 16 | #include 17 | 18 | int main() { 19 | Foo foo; 20 | } 21 | -------------------------------------------------------------------------------- /Source/leathers/all: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | #include 73 | #include 74 | #include 75 | #include 76 | #include 77 | #include 78 | #include 79 | #include 80 | #include 81 | #include 82 | #include 83 | #include 84 | #include 85 | #include 86 | #include 87 | #include 88 | #include 89 | #include 90 | #include 91 | #include 92 | #include 93 | #include 94 | #include 95 | #include 96 | #include 97 | #include 98 | #include 99 | #include 100 | #include 101 | #include 102 | #include 103 | #include 104 | #include 105 | #include 106 | #include 107 | #include 108 | -------------------------------------------------------------------------------- /Source/leathers/arc-bridge-casts-disallowed-in-nonarc: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/arc-bridge-casts-disallowed-in-nonarc` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_ARC_BRIDGE_CASTS_DISALLOWED_IN_NONARC_) 14 | # error "`leathers/arc-bridge-casts-disallowed-in-nonarc` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_ARC_BRIDGE_CASTS_DISALLOWED_IN_NONARC_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Warc-bridge-casts-disallowed-in-nonarc") 22 | # pragma clang diagnostic ignored "-Warc-bridge-casts-disallowed-in-nonarc" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/arc-repeated-use-of-weak: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/arc-repeated-use-of-weak` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_ARC_REPEATED_USE_OF_WEAK_) 14 | # error "`leathers/arc-repeated-use-of-weak` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_ARC_REPEATED_USE_OF_WEAK_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Warc-repeated-use-of-weak") 22 | # pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/assign-base-inaccessible: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/assign-base-inaccessible` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_ASSIGN_BASE_INACCESSIBLE_) 14 | # error "`leathers/assign-base-inaccessible` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_ASSIGN_BASE_INACCESSIBLE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4626) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/assign-could-not-be-generated: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/assign-could-not-be-generated` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_ASSIGN_COULD_NOT_BE_GENERATED_) 14 | # error "`leathers/assign-could-not-be-generated` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_ASSIGN_COULD_NOT_BE_GENERATED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4512) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/assignment-within-conditional: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/assignment-within-conditional` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_ASSIGNMENT_WITHIN_CONDITIONAL_) 14 | # error "`leathers/assignment-within-conditional` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_ASSIGNMENT_WITHIN_CONDITIONAL_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4706) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/automatic-inline: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/automatic-inline` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_AUTOMATIC_INLINE_) 14 | # error "`leathers/automatic-inline` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_AUTOMATIC_INLINE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4711) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/behavior-change: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/behavior-change` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_BEHAVIOR_CHANGE_) 14 | # error "`leathers/behavior-change` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_BEHAVIOR_CHANGE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4350) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/bool-conversion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/bool-conversion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_BOOL_CONVERSION_) 14 | # error "`leathers/bool-conversion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_BOOL_CONVERSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wbool-conversion") 22 | # pragma clang diagnostic ignored "-Wbool-conversion" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/c++11-extensions: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/c++11-extensions` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CXX11_EXTENSIONS_) 14 | # error "`leathers/c++11-extensions` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CXX11_EXTENSIONS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wc++11-extensions") 22 | # pragma clang diagnostic ignored "-Wc++11-extensions" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/c++98-compat: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/c++98-compat` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CXX98_COMPAT_) 14 | # error "`leathers/c++98-compat` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CXX98_COMPAT_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wc++98-compat") 22 | # pragma clang diagnostic ignored "-Wc++98-compat" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/c++98-compat-pedantic: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/c++98-compat-pedantic` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CXX98_COMPAT_PEDANTIC_) 14 | # error "`leathers/c++98-compat-pedantic` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CXX98_COMPAT_PEDANTIC_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wc++98-compat-pedantic") 22 | # pragma clang diagnostic ignored "-Wc++98-compat-pedantic" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/cast-align: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/cast-align` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CAST_ALIGN_) 14 | # error "`leathers/cast-align` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CAST_ALIGN_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wcast-align") 22 | # pragma clang diagnostic ignored "-Wcast-align" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wcast-align" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/catch-semantic-changed: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/catch-semantic-changed` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CATCH_SEMANTIC_CHANGED_) 14 | # error "`leathers/catch-semantic-changed` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CATCH_SEMANTIC_CHANGED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4571) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/compatibility-c++98: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #include 8 | #include 9 | -------------------------------------------------------------------------------- /Source/leathers/conditional-uninitialized: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/conditional-uninitialized` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CONDITIONAL_UNINITIALIZED_) 14 | # error "`leathers/conditional-uninitialized` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CONDITIONAL_UNINITIALIZED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wconditional-uninitialized") 22 | # pragma clang diagnostic ignored "-Wconditional-uninitialized" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/constant-conditional: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/constant-conditional` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CONSTANT_CONDITIONAL_) 14 | # error "`leathers/constant-conditional` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CONSTANT_CONDITIONAL_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4127) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/constant-conversion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/constant-conversion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CONSTANT_CONVERSION_) 14 | # error "`leathers/constant-conversion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CONSTANT_CONVERSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wconstant-conversion") 22 | # pragma clang diagnostic ignored "-Wconstant-conversion" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/conversion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/conversion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CONVERSION_) 14 | # error "`leathers/conversion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CONVERSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wconversion") 22 | # pragma clang diagnostic ignored "-Wconversion" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wconversion" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4244) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/conversion-loss: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/conversion-loss` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CONVERSION_LOSS_) 14 | # error "`leathers/conversion-loss` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CONVERSION_LOSS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wconversion") 22 | # pragma clang diagnostic ignored "-Wconversion" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wconversion" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4242) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/conversion-sign-extended: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/conversion-sign-extended` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_CONVERSION_SIGN_EXTENDED_) 14 | # error "`leathers/conversion-sign-extended` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_CONVERSION_SIGN_EXTENDED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4826) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/copy-ctor-could-not-be-generated: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/copy-ctor-could-not-be-generated` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_COPY_CTOR_COULD_NOT_BE_GENERATED_) 14 | # error "`leathers/copy-ctor-could-not-be-generated` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_COPY_CTOR_COULD_NOT_BE_GENERATED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4625) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/covered-switch-default: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/covered-switch-default` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_COVERED_SWITCH_DEFAULT_) 14 | # error "`leathers/covered-switch-default` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_COVERED_SWITCH_DEFAULT_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wcovered-switch-default") 22 | # pragma clang diagnostic ignored "-Wcovered-switch-default" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/deprecated: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/deprecated` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DEPRECATED_) 14 | # error "`leathers/deprecated` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DEPRECATED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdeprecated") 22 | # pragma clang diagnostic ignored "-Wdeprecated" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wdeprecated" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/deprecated-declarations: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/deprecated-declarations` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DEPRECATED_DECLARATIONS_) 14 | # error "`leathers/deprecated-declarations` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DEPRECATED_DECLARATIONS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdeprecated-declarations") 22 | # pragma clang diagnostic ignored "-Wdeprecated-declarations" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wdeprecated-declarations" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4996) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/deprecated-implementations: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/deprecated-implementations` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DEPRECATED_IMPLEMENTATIONS_) 14 | # error "`leathers/deprecated-implementations` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DEPRECATED_IMPLEMENTATIONS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdeprecated-implementations") 22 | # pragma clang diagnostic ignored "-Wdeprecated-implementations" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/deprecated-objc-isa-usage: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/deprecated-objc-isa-usage` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DEPRECATED_OBJC_ISA_USAGE_) 14 | # error "`leathers/deprecated-objc-isa-usage` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DEPRECATED_OBJC_ISA_USAGE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdeprecated-objc-isa-usage") 22 | # pragma clang diagnostic ignored "-Wdeprecated-objc-isa-usage" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/deprecated-register: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/deprecated-register` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DEPRECATED_REGISTER_) 14 | # error "`leathers/deprecated-register` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DEPRECATED_REGISTER_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdeprecated-register") 22 | # pragma clang diagnostic ignored "-Wdeprecated-register" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/dflt-ctor-base-inaccessible: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/dflt-ctor-base-inaccessible` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DFLT_CTOR_BASE_INACCESSIBLE_) 14 | # error "`leathers/dflt-ctor-base-inaccessible` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DFLT_CTOR_BASE_INACCESSIBLE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4623) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/dflt-ctor-could-not-be-generated: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/dflt-ctor-could-not-be-generated` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DFLT_CTOR_COULD_NOT_BE_GENERATED_) 14 | # error "`leathers/dflt-ctor-could-not-be-generated` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DFLT_CTOR_COULD_NOT_BE_GENERATED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4510) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/digraphs-not-supported: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/digraphs-not-supported` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DIGRAPHS_NOT_SUPPORTED_) 14 | # error "`leathers/digraphs-not-supported` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DIGRAPHS_NOT_SUPPORTED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4628) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/disabled-macro-expansion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/disabled-macro-expansion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DISABLED_MACRO_EXPANSION_) 14 | # error "`leathers/disabled-macro-expansion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DISABLED_MACRO_EXPANSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdisabled-macro-expansion") 22 | # pragma clang diagnostic ignored "-Wdisabled-macro-expansion" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/documentation: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/documentation` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DOCUMENTATION_) 14 | # error "`leathers/documentation` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DOCUMENTATION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdocumentation") 22 | # pragma clang diagnostic ignored "-Wdocumentation" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/documentation-unknown-command: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/documentation-unknown-command` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DOCUMENTATION_UNKNOWN_COMMAND_) 14 | # error "`leathers/documentation-unknown-command` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DOCUMENTATION_UNKNOWN_COMMAND_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wdocumentation-unknown-command") 22 | # pragma clang diagnostic ignored "-Wdocumentation-unknown-command" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/duplicate-method-match: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/duplicate-method-match` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_DUPLICATE_METHOD_MATCH_) 14 | # error "`leathers/duplicate-method-match` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_DUPLICATE_METHOD_MATCH_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wduplicate-method-match") 22 | # pragma clang diagnostic ignored "-Wduplicate-method-match" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/empty-body: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/empty-body` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_EMPTY_BODY_) 14 | # error "`leathers/empty-body` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_EMPTY_BODY_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wempty-body") 22 | # pragma clang diagnostic ignored "-Wempty-body" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wempty-body" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/enum-conversion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/enum-conversion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_ENUM_CONVERSION_) 14 | # error "`leathers/enum-conversion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_ENUM_CONVERSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wenum-conversion") 22 | # pragma clang diagnostic ignored "-Wenum-conversion" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/exit-time-destructors: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/exit-time-destructors` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_EXIT_TIME_DESTRUCTORS_) 14 | # error "`leathers/exit-time-destructors` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_EXIT_TIME_DESTRUCTORS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wexit-time-destructors") 22 | # pragma clang diagnostic ignored "-Wexit-time-destructors" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/explicit-ownership-type: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/explicit-ownership-type` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_EXPLICIT_OWNERSHIP_TYPE_) 14 | # error "`leathers/explicit-ownership-type` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_EXPLICIT_OWNERSHIP_TYPE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wexplicit-ownership-type") 22 | # pragma clang diagnostic ignored "-Wexplicit-ownership-type" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/extra-semi: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/extra-semi` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_EXTRA_SEMI_) 14 | # error "`leathers/extra-semi` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_EXTRA_SEMI_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wextra-semi") 22 | # pragma clang diagnostic ignored "-Wextra-semi" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/force-not-inlined: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/force-not-inlined` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_FORCE_NOT_INLINED_) 14 | # error "`leathers/force-not-inlined` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_FORCE_NOT_INLINED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4714) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/format: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/format` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_FORMAT_) 14 | # error "`leathers/format` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_FORMAT_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wformat") 22 | # pragma clang diagnostic ignored "-Wformat" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wformat" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/four-char-constants: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/four-char-constants` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_FOUR_CHAR_CONSTANTS_) 14 | # error "`leathers/four-char-constants` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_FOUR_CHAR_CONSTANTS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wfour-char-constants") 22 | # pragma clang diagnostic ignored "-Wfour-char-constants" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/global-constructors: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/global-constructors` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_GLOBAL_CONSTRUCTORS_) 14 | # error "`leathers/global-constructors` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_GLOBAL_CONSTRUCTORS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wglobal-constructors") 22 | # pragma clang diagnostic ignored "-Wglobal-constructors" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/ill-formed-comma-expr: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/ill-formed-comma-expr` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_ILL_FORMED_COMMA_EXPR_) 14 | # error "`leathers/ill-formed-comma-expr` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_ILL_FORMED_COMMA_EXPR_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunused-value") 22 | # pragma clang diagnostic ignored "-Wunused-value" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunused-value" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4548) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/implicit-atomic-properties: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/implicit-atomic-properties` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_IMPLICIT_ATOMIC_PROPERTIES_) 14 | # error "`leathers/implicit-atomic-properties` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_IMPLICIT_ATOMIC_PROPERTIES_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wimplicit-atomic-properties") 22 | # pragma clang diagnostic ignored "-Wimplicit-atomic-properties" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/implicit-fallthrough: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/implicit-fallthrough` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_IMPLICIT_FALLTHROUGH_) 14 | # error "`leathers/implicit-fallthrough` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_IMPLICIT_FALLTHROUGH_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wimplicit-fallthrough") 22 | # pragma clang diagnostic ignored "-Wimplicit-fallthrough" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/implicit-retain-self: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/implicit-retain-self` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_IMPLICIT_RETAIN_SELF_) 14 | # error "`leathers/implicit-retain-self` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_IMPLICIT_RETAIN_SELF_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wimplicit-retain-self") 22 | # pragma clang diagnostic ignored "-Wimplicit-retain-self" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/inherits-via-dominance: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/inherits-via-dominance` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_INHERITS_VIA_DOMINANCE_) 14 | # error "`leathers/inherits-via-dominance` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_INHERITS_VIA_DOMINANCE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4250) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/inline: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | -------------------------------------------------------------------------------- /Source/leathers/int-conversion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/int-conversion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_INT_CONVERSION_) 14 | # error "`leathers/int-conversion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_INT_CONVERSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wint-conversion") 22 | # pragma clang diagnostic ignored "-Wint-conversion" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/invalid-offsetof: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/invalid-offsetof` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_INVALID_OFFSETOF_) 14 | # error "`leathers/invalid-offsetof` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_INVALID_OFFSETOF_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Winvalid-offsetof") 22 | # pragma clang diagnostic ignored "-Winvalid-offsetof" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Winvalid-offsetof" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/is-defined-to-be: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/is-defined-to-be` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_IS_DEFINED_TO_BE_) 14 | # error "`leathers/is-defined-to-be` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_IS_DEFINED_TO_BE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4574) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/layout-changed: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/layout-changed` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_LAYOUT_CHANGED_) 14 | # error "`leathers/layout-changed` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_LAYOUT_CHANGED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4371) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/missing-braces: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/missing-braces` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_MISSING_BRACES_) 14 | # error "`leathers/missing-braces` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_MISSING_BRACES_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wmissing-braces") 22 | # pragma clang diagnostic ignored "-Wmissing-braces" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wmissing-braces" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/missing-field-initializers: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/missing-field-initializers` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_MISSING_FIELD_INITIALIZERS_) 14 | # error "`leathers/missing-field-initializers` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_MISSING_FIELD_INITIALIZERS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wmissing-field-initializers") 22 | # pragma clang diagnostic ignored "-Wmissing-field-initializers" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wmissing-field-initializers" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/missing-noreturn: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/missing-noreturn` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_MISSING_NORETURN_) 14 | # error "`leathers/missing-noreturn` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_MISSING_NORETURN_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wmissing-noreturn") 22 | # pragma clang diagnostic ignored "-Wmissing-noreturn" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wmissing-noreturn" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/missing-prototypes: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/missing-prototypes` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_MISSING_PROTOTYPES_) 14 | # error "`leathers/missing-prototypes` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_MISSING_PROTOTYPES_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wmissing-prototypes") 22 | # pragma clang diagnostic ignored "-Wmissing-prototypes" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wmissing-prototypes" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/name-length-exceeded: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/name-length-exceeded` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_NAME_LENGTH_EXCEEDED_) 14 | # error "`leathers/name-length-exceeded` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_NAME_LENGTH_EXCEEDED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4503) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/narrowing: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Thales group 2 | 3 | #if !defined(LEATHERS_PUSH_) 4 | # error "`leathers/narrowing` used " 5 | "without `leathers/push`, " 6 | "see README.txt for more info" 7 | #endif 8 | 9 | #if defined(LEATHERS_NARROWING_) 10 | # error "`leathers/narrowing` " 11 | "already included; see README.txt for more info" 12 | #else 13 | # define LEATHERS_NARROWING_ 14 | #endif 15 | 16 | #if (BOOST_COMP_CLANG) 17 | # if __has_warning("-Wnarrowing") 18 | # pragma clang diagnostic ignored "-Wnarrowing" 19 | # endif 20 | #endif 21 | 22 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 23 | # pragma GCC diagnostic ignored "-Wnarrowing" 24 | #endif 25 | 26 | #if (BOOST_COMP_MSVC) 27 | # pragma warning(disable: 4838) 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/newline-eof: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/newline-eof` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_NEWLINE_EOF_) 14 | # error "`leathers/newline-eof` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_NEWLINE_EOF_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wnewline-eof") 22 | # pragma clang diagnostic ignored "-Wnewline-eof" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/no-such-warning: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/no-such-warning` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_NO_SUCH_WARNING_) 14 | # error "`leathers/no-such-warning` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_NO_SUCH_WARNING_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4619) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/non-virtual-dtor: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/non-virtual-dtor` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_NON_VIRTUAL_DTOR_) 14 | # error "`leathers/non-virtual-dtor` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_NON_VIRTUAL_DTOR_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wnon-virtual-dtor") 22 | # pragma clang diagnostic ignored "-Wnon-virtual-dtor" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wnon-virtual-dtor" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4265) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/not-inlined: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/not-inlined` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_NOT_INLINED_) 14 | # error "`leathers/not-inlined` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_NOT_INLINED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4710) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/objc-missing-property-synthesis: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/objc-missing-property-synthesis` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_OBJC_MISSING_PROPERTY_SYNTHESIS_) 14 | # error "`leathers/objc-missing-property-synthesis` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_OBJC_MISSING_PROPERTY_SYNTHESIS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wobjc-missing-property-synthesis") 22 | # pragma clang diagnostic ignored "-Wobjc-missing-property-synthesis" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/objc-root-class: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/objc-root-class` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_OBJC_ROOT_CLASS_) 14 | # error "`leathers/objc-root-class` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_OBJC_ROOT_CLASS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wobjc-root-class") 22 | # pragma clang diagnostic ignored "-Wobjc-root-class" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/object-layout-change: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/object-layout-change` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_OBJECT_LAYOUT_CHANGE_) 14 | # error "`leathers/object-layout-change` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_OBJECT_LAYOUT_CHANGE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4435) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/old-style-cast: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/old-style-cast` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_OLD_STYLE_CAST_) 14 | # error "`leathers/old-style-cast` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_OLD_STYLE_CAST_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wold-style-cast") 22 | # pragma clang diagnostic ignored "-Wold-style-cast" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wold-style-cast" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/overloaded-virtual: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/overloaded-virtual` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_OVERLOADED_VIRTUAL_) 14 | # error "`leathers/overloaded-virtual` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_OVERLOADED_VIRTUAL_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Woverloaded-virtual") 22 | # pragma clang diagnostic ignored "-Woverloaded-virtual" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Woverloaded-virtual" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/padded: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/padded` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_PADDED_) 14 | # error "`leathers/padded` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_PADDED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wpadded") 22 | # pragma clang diagnostic ignored "-Wpadded" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wpadded" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4820) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/parentheses: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/parentheses` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_PARENTHESES_) 14 | # error "`leathers/parentheses` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_PARENTHESES_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wparentheses") 22 | # pragma clang diagnostic ignored "-Wparentheses" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wparentheses" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/pedantic: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/pedantic` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_PEDANTIC_) 14 | # error "`leathers/pedantic` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_PEDANTIC_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wpedantic") 22 | # pragma clang diagnostic ignored "-Wpedantic" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wpedantic" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/pointer-sign: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/pointer-sign` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_POINTER_SIGN_) 14 | # error "`leathers/pointer-sign` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_POINTER_SIGN_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wpointer-sign") 22 | # pragma clang diagnostic ignored "-Wpointer-sign" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wpointer-sign" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/pop: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "'leathers/push' include not detected " 9 | "or already closed with other 'pop'; " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #undef LEATHERS_PUSH_ 14 | 15 | #if (BOOST_COMP_CLANG) 16 | # pragma clang diagnostic pop 17 | #endif 18 | 19 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 20 | # pragma GCC diagnostic pop 21 | #endif 22 | 23 | #if (BOOST_COMP_MSVC) 24 | # pragma warning(pop) 25 | #endif 26 | 27 | #undef LEATHERS_CXX98_COMPAT_ 28 | #undef LEATHERS_CXX98_COMPAT_PEDANTIC_ 29 | #undef LEATHERS_ASSIGN_BASE_INACCESSIBLE_ 30 | #undef LEATHERS_ASSIGN_COULD_NOT_BE_GENERATED_ 31 | #undef LEATHERS_COPY_CTOR_COULD_NOT_BE_GENERATED_ 32 | #undef LEATHERS_DFLT_CTOR_BASE_INACCESSIBLE_ 33 | #undef LEATHERS_DFLT_CTOR_COULD_NOT_BE_GENERATED_ 34 | #undef LEATHERS_USER_CTOR_REQUIRED_ 35 | #undef LEATHERS_AUTOMATIC_INLINE_ 36 | #undef LEATHERS_FORCE_NOT_INLINED_ 37 | #undef LEATHERS_NOT_INLINED_ 38 | #undef LEATHERS_UNREFERENCED_INLINE_ 39 | #undef LEATHERS_BEHAVIOR_CHANGE_ 40 | #undef LEATHERS_BOOL_CONVERSION_ 41 | #undef LEATHERS_CXX11_EXTENSIONS_ 42 | #undef LEATHERS_CAST_ALIGN_ 43 | #undef LEATHERS_CATCH_SEMANTIC_CHANGED_ 44 | #undef LEATHERS_CONDITIONAL_UNINITIALIZED_ 45 | #undef LEATHERS_CONSTANT_CONDITIONAL_ 46 | #undef LEATHERS_CONSTANT_CONVERSION_ 47 | #undef LEATHERS_CONVERSION_ 48 | #undef LEATHERS_CONVERSION_LOSS_ 49 | #undef LEATHERS_CONVERSION_SIGN_EXTENDED_ 50 | #undef LEATHERS_COVERED_SWITCH_DEFAULT_ 51 | #undef LEATHERS_DEPRECATED_ 52 | #undef LEATHERS_DEPRECATED_DECLARATIONS_ 53 | #undef LEATHERS_DEPRECATED_OBJC_ISA_USAGE_ 54 | #undef LEATHERS_DEPRECATED_REGISTER_ 55 | #undef LEATHERS_DIGRAPHS_NOT_SUPPORTED_ 56 | #undef LEATHERS_DISABLED_MACRO_EXPANSION_ 57 | #undef LEATHERS_DOCUMENTATION_ 58 | #undef LEATHERS_DOCUMENTATION_UNKNOWN_COMMAND_ 59 | #undef LEATHERS_EMPTY_BODY_ 60 | #undef LEATHERS_ENUM_CONVERSION_ 61 | #undef LEATHERS_EXIT_TIME_DESTRUCTORS_ 62 | #undef LEATHERS_EXTRA_SEMI_ 63 | #undef LEATHERS_FORMAT_ 64 | #undef LEATHERS_FOUR_CHAR_CONSTANTS_ 65 | #undef LEATHERS_GLOBAL_CONSTRUCTORS_ 66 | #undef LEATHERS_ILL_FORMED_COMMA_EXPR_ 67 | #undef LEATHERS_IMPLICIT_FALLTHROUGH_ 68 | #undef LEATHERS_INHERITS_VIA_DOMINANCE_ 69 | #undef LEATHERS_INT_CONVERSION_ 70 | #undef LEATHERS_INVALID_OFFSETOF_ 71 | #undef LEATHERS_IS_DEFINED_TO_BE_ 72 | #undef LEATHERS_LAYOUT_CHANGED_ 73 | #undef LEATHERS_MISSING_BRACES_ 74 | #undef LEATHERS_MISSING_FIELD_INITIALIZERS_ 75 | #undef LEATHERS_MISSING_NORETURN_ 76 | #undef LEATHERS_MISSING_PROTOTYPES_ 77 | #undef LEATHERS_NAME_LENGTH_EXCEEDED_ 78 | #undef LEATHERS_NARROWING_ 79 | #undef LEATHERS_NEWLINE_EOF_ 80 | #undef LEATHERS_NO_SUCH_WARNING_ 81 | #undef LEATHERS_NON_VIRTUAL_DTOR_ 82 | #undef LEATHERS_OBJECT_LAYOUT_CHANGE_ 83 | #undef LEATHERS_OLD_STYLE_CAST_ 84 | #undef LEATHERS_OVERLOADED_VIRTUAL_ 85 | #undef LEATHERS_PADDED_ 86 | #undef LEATHERS_PARENTHESES_ 87 | #undef LEATHERS_PEDANTIC_ 88 | #undef LEATHERS_POINTER_SIGN_ 89 | #undef LEATHERS_RETURN_TYPE_ 90 | #undef LEATHERS_SHADOW_ 91 | #undef LEATHERS_SHIFT_SIGN_OVERFLOW_ 92 | #undef LEATHERS_SHORTEN_64_TO_32_ 93 | #undef LEATHERS_SIGN_COMPARE_ 94 | #undef LEATHERS_SIGN_CONVERSION_ 95 | #undef LEATHERS_SIGNED_UNSIGNED_COMPARE_ 96 | #undef LEATHERS_STATIC_CTOR_NOT_THREAD_SAFE_ 97 | #undef LEATHERS_SWITCH_ 98 | #undef LEATHERS_SWITCH_ENUM_ 99 | #undef LEATHERS_THIS_USED_IN_INIT_ 100 | #undef LEATHERS_UNDEF_ 101 | #undef LEATHERS_UNINITIALIZED_ 102 | #undef LEATHERS_UNKNOWN_PRAGMAS_ 103 | #undef LEATHERS_UNREACHABLE_CODE_ 104 | #undef LEATHERS_UNREACHABLE_CODE_RETURN_ 105 | #undef LEATHERS_UNSAFE_CONVERSION_ 106 | #undef LEATHERS_UNUSED_BUT_SET_VARIABLE_ 107 | #undef LEATHERS_UNUSED_FUNCTION_ 108 | #undef LEATHERS_UNUSED_LABEL_ 109 | #undef LEATHERS_UNUSED_PARAMETER_ 110 | #undef LEATHERS_UNUSED_VALUE_ 111 | #undef LEATHERS_UNUSED_VARIABLE_ 112 | #undef LEATHERS_USED_BUT_MARKED_UNUSED_ 113 | #undef LEATHERS_WEAK_VTABLES_ 114 | #undef LEATHERS_ARC_BRIDGE_CASTS_DISALLOWED_IN_NONARC_ 115 | #undef LEATHERS_ARC_REPEATED_USE_OF_WEAK_ 116 | #undef LEATHERS_DEPRECATED_IMPLEMENTATIONS_ 117 | #undef LEATHERS_DUPLICATE_METHOD_MATCH_ 118 | #undef LEATHERS_EXPLICIT_OWNERSHIP_TYPE_ 119 | #undef LEATHERS_IMPLICIT_ATOMIC_PROPERTIES_ 120 | #undef LEATHERS_IMPLICIT_RETAIN_SELF_ 121 | #undef LEATHERS_OBJC_MISSING_PROPERTY_SYNTHESIS_ 122 | #undef LEATHERS_OBJC_ROOT_CLASS_ 123 | #undef LEATHERS_PROTOCOL_ 124 | #undef LEATHERS_RECEIVER_IS_WEAK_ 125 | #undef LEATHERS_SELECTOR_ 126 | #undef LEATHERS_STRICT_SELECTOR_MATCH_ 127 | #undef LEATHERS_UNDECLARED_SELECTOR_ 128 | -------------------------------------------------------------------------------- /Source/leathers/protocol: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/protocol` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_PROTOCOL_) 14 | # error "`leathers/protocol` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_PROTOCOL_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wprotocol") 22 | # pragma clang diagnostic ignored "-Wprotocol" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wprotocol" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/push: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #include 8 | 9 | #if defined(LEATHERS_PUSH_) 10 | # error "Not ending 'leathers/push' include detected;" 11 | "every 'push' must ends with 'pop'; " 12 | "see `https://github.com/ruslo/leathers/wiki/Pitfalls` for more info" 13 | #else 14 | # define LEATHERS_PUSH_ 15 | #endif 16 | 17 | #if (BOOST_COMP_CLANG) 18 | # pragma clang diagnostic push 19 | #endif 20 | 21 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 22 | # pragma GCC diagnostic push 23 | #endif 24 | 25 | #if (BOOST_COMP_MSVC) 26 | # pragma warning(push) 27 | #endif 28 | -------------------------------------------------------------------------------- /Source/leathers/receiver-is-weak: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/receiver-is-weak` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_RECEIVER_IS_WEAK_) 14 | # error "`leathers/receiver-is-weak` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_RECEIVER_IS_WEAK_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wreceiver-is-weak") 22 | # pragma clang diagnostic ignored "-Wreceiver-is-weak" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/return-type: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/return-type` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_RETURN_TYPE_) 14 | # error "`leathers/return-type` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_RETURN_TYPE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wreturn-type") 22 | # pragma clang diagnostic ignored "-Wreturn-type" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wreturn-type" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/selector: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/selector` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SELECTOR_) 14 | # error "`leathers/selector` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SELECTOR_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wselector") 22 | # pragma clang diagnostic ignored "-Wselector" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wselector" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/shadow: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/shadow` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SHADOW_) 14 | # error "`leathers/shadow` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SHADOW_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wshadow") 22 | # pragma clang diagnostic ignored "-Wshadow" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wshadow" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/shift-sign-overflow: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/shift-sign-overflow` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SHIFT_SIGN_OVERFLOW_) 14 | # error "`leathers/shift-sign-overflow` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SHIFT_SIGN_OVERFLOW_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wshift-sign-overflow") 22 | # pragma clang diagnostic ignored "-Wshift-sign-overflow" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/shorten-64-to-32: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/shorten-64-to-32` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SHORTEN_64_TO_32_) 14 | # error "`leathers/shorten-64-to-32` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SHORTEN_64_TO_32_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wshorten-64-to-32") 22 | # pragma clang diagnostic ignored "-Wshorten-64-to-32" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/sign-compare: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/sign-compare` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SIGN_COMPARE_) 14 | # error "`leathers/sign-compare` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SIGN_COMPARE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wsign-compare") 22 | # pragma clang diagnostic ignored "-Wsign-compare" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wsign-compare" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4389) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/sign-conversion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/sign-conversion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SIGN_CONVERSION_) 14 | # error "`leathers/sign-conversion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SIGN_CONVERSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wsign-conversion") 22 | # pragma clang diagnostic ignored "-Wsign-conversion" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wsign-conversion" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4365) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/signed-unsigned-compare: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/signed-unsigned-compare` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SIGNED_UNSIGNED_COMPARE_) 14 | # error "`leathers/signed-unsigned-compare` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SIGNED_UNSIGNED_COMPARE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wsign-compare") 22 | # pragma clang diagnostic ignored "-Wsign-compare" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wsign-compare" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4388) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/special-members: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /Source/leathers/static-ctor-not-thread-safe: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/static-ctor-not-thread-safe` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_STATIC_CTOR_NOT_THREAD_SAFE_) 14 | # error "`leathers/static-ctor-not-thread-safe` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_STATIC_CTOR_NOT_THREAD_SAFE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4640) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/strict-selector-match: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/strict-selector-match` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_STRICT_SELECTOR_MATCH_) 14 | # error "`leathers/strict-selector-match` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_STRICT_SELECTOR_MATCH_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wstrict-selector-match") 22 | # pragma clang diagnostic ignored "-Wstrict-selector-match" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wstrict-selector-match" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/sugar.cmake: -------------------------------------------------------------------------------- 1 | # This file generated automatically: 2 | # https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | # Copyright (c) 2014, Ruslan Baratov 5 | # All rights reserved. 6 | 7 | if(DEFINED LEATHERS_SOURCE_LEATHERS_SUGAR_CMAKE_) 8 | return() 9 | else() 10 | set(LEATHERS_SOURCE_LEATHERS_SUGAR_CMAKE_ 1) 11 | endif() 12 | 13 | include(sugar_files) 14 | 15 | sugar_files( 16 | LEATHERS_SOURCES 17 | ### 18 | push 19 | pop 20 | ### 21 | all 22 | ### 23 | c++98-compat 24 | c++98-compat-pedantic 25 | assign-base-inaccessible 26 | assign-could-not-be-generated 27 | copy-ctor-could-not-be-generated 28 | dflt-ctor-base-inaccessible 29 | dflt-ctor-could-not-be-generated 30 | user-ctor-required 31 | automatic-inline 32 | force-not-inlined 33 | not-inlined 34 | unreferenced-inline 35 | behavior-change 36 | bool-conversion 37 | c++11-extensions 38 | cast-align 39 | catch-semantic-changed 40 | conditional-uninitialized 41 | constant-conditional 42 | constant-conversion 43 | conversion 44 | conversion-loss 45 | conversion-sign-extended 46 | covered-switch-default 47 | deprecated 48 | deprecated-declarations 49 | deprecated-objc-isa-usage 50 | deprecated-register 51 | digraphs-not-supported 52 | disabled-macro-expansion 53 | documentation 54 | documentation-unknown-command 55 | empty-body 56 | enum-conversion 57 | exit-time-destructors 58 | extra-semi 59 | format 60 | four-char-constants 61 | global-constructors 62 | ill-formed-comma-expr 63 | implicit-fallthrough 64 | inherits-via-dominance 65 | int-conversion 66 | invalid-offsetof 67 | is-defined-to-be 68 | layout-changed 69 | missing-braces 70 | missing-field-initializers 71 | missing-noreturn 72 | missing-prototypes 73 | name-length-exceeded 74 | newline-eof 75 | no-such-warning 76 | non-virtual-dtor 77 | object-layout-change 78 | old-style-cast 79 | overloaded-virtual 80 | padded 81 | parentheses 82 | pedantic 83 | pointer-sign 84 | return-type 85 | shadow 86 | shift-sign-overflow 87 | shorten-64-to-32 88 | sign-compare 89 | sign-conversion 90 | signed-unsigned-compare 91 | static-ctor-not-thread-safe 92 | switch 93 | switch-enum 94 | this-used-in-init 95 | undef 96 | uninitialized 97 | unknown-pragmas 98 | unreachable-code 99 | unreachable-code-return 100 | unsafe-conversion 101 | unused-but-set-variable 102 | unused-function 103 | unused-label 104 | unused-parameter 105 | unused-value 106 | unused-variable 107 | used-but-marked-unused 108 | weak-vtables 109 | arc-bridge-casts-disallowed-in-nonarc 110 | arc-repeated-use-of-weak 111 | deprecated-implementations 112 | duplicate-method-match 113 | explicit-ownership-type 114 | implicit-atomic-properties 115 | implicit-retain-self 116 | objc-missing-property-synthesis 117 | objc-root-class 118 | protocol 119 | receiver-is-weak 120 | selector 121 | strict-selector-match 122 | undeclared-selector 123 | ) 124 | -------------------------------------------------------------------------------- /Source/leathers/switch: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/switch` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SWITCH_) 14 | # error "`leathers/switch` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SWITCH_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wswitch") 22 | # pragma clang diagnostic ignored "-Wswitch" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wswitch" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4062) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/switch-enum: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/switch-enum` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_SWITCH_ENUM_) 14 | # error "`leathers/switch-enum` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_SWITCH_ENUM_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wswitch-enum") 22 | # pragma clang diagnostic ignored "-Wswitch-enum" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wswitch-enum" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4061) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/this-used-in-init: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/this-used-in-init` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_THIS_USED_IN_INIT_) 14 | # error "`leathers/this-used-in-init` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_THIS_USED_IN_INIT_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4355) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/undeclared-selector: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/undeclared-selector` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNDECLARED_SELECTOR_) 14 | # error "`leathers/undeclared-selector` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNDECLARED_SELECTOR_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wundeclared-selector") 22 | # pragma clang diagnostic ignored "-Wundeclared-selector" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wundeclared-selector" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/undef: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/undef` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNDEF_) 14 | # error "`leathers/undef` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNDEF_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wundef") 22 | # pragma clang diagnostic ignored "-Wundef" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wundef" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4668) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/uninitialized: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/uninitialized` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNINITIALIZED_) 14 | # error "`leathers/uninitialized` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNINITIALIZED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wuninitialized") 22 | # pragma clang diagnostic ignored "-Wuninitialized" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wuninitialized" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/unknown-pragmas: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unknown-pragmas` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNKNOWN_PRAGMAS_) 14 | # error "`leathers/unknown-pragmas` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNKNOWN_PRAGMAS_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunknown-pragmas") 22 | # pragma clang diagnostic ignored "-Wunknown-pragmas" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunknown-pragmas" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/unreachable-code: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unreachable-code` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNREACHABLE_CODE_) 14 | # error "`leathers/unreachable-code` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNREACHABLE_CODE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunreachable-code") 22 | # pragma clang diagnostic ignored "-Wunreachable-code" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunreachable-code" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4702) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/unreachable-code-return: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unreachable-code-return` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNREACHABLE_CODE_RETURN_) 14 | # error "`leathers/unreachable-code-return` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNREACHABLE_CODE_RETURN_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunreachable-code-return") 22 | # pragma clang diagnostic ignored "-Wunreachable-code-return" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/unreferenced-inline: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unreferenced-inline` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNREFERENCED_INLINE_) 14 | # error "`leathers/unreferenced-inline` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNREFERENCED_INLINE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4514) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/unsafe-conversion: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unsafe-conversion` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNSAFE_CONVERSION_) 14 | # error "`leathers/unsafe-conversion` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNSAFE_CONVERSION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4191) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/unused-but-set-variable: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unused-but-set-variable` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNUSED_BUT_SET_VARIABLE_) 14 | # error "`leathers/unused-but-set-variable` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNUSED_BUT_SET_VARIABLE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 21 | # pragma GCC diagnostic ignored "-Wunused-but-set-variable" 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/unused-function: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unused-function` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNUSED_FUNCTION_) 14 | # error "`leathers/unused-function` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNUSED_FUNCTION_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunused-function") 22 | # pragma clang diagnostic ignored "-Wunused-function" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunused-function" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/unused-label: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unused-label` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNUSED_LABEL_) 14 | # error "`leathers/unused-label` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNUSED_LABEL_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunused-label") 22 | # pragma clang diagnostic ignored "-Wunused-label" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunused-label" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/unused-parameter: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unused-parameter` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNUSED_PARAMETER_) 14 | # error "`leathers/unused-parameter` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNUSED_PARAMETER_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunused-parameter") 22 | # pragma clang diagnostic ignored "-Wunused-parameter" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunused-parameter" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4100) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/unused-value: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unused-value` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNUSED_VALUE_) 14 | # error "`leathers/unused-value` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNUSED_VALUE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunused-value") 22 | # pragma clang diagnostic ignored "-Wunused-value" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunused-value" 28 | #endif 29 | 30 | #if (BOOST_COMP_MSVC) 31 | # pragma warning(disable: 4555) 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/leathers/unused-variable: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/unused-variable` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_UNUSED_VARIABLE_) 14 | # error "`leathers/unused-variable` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_UNUSED_VARIABLE_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wunused-variable") 22 | # pragma clang diagnostic ignored "-Wunused-variable" 23 | # endif 24 | #endif 25 | 26 | #if (BOOST_COMP_GNUC) && !(BOOST_COMP_CLANG) 27 | # pragma GCC diagnostic ignored "-Wunused-variable" 28 | #endif 29 | -------------------------------------------------------------------------------- /Source/leathers/used-but-marked-unused: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/used-but-marked-unused` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_USED_BUT_MARKED_UNUSED_) 14 | # error "`leathers/used-but-marked-unused` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_USED_BUT_MARKED_UNUSED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wused-but-marked-unused") 22 | # pragma clang diagnostic ignored "-Wused-but-marked-unused" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/leathers/user-ctor-required: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/user-ctor-required` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_USER_CTOR_REQUIRED_) 14 | # error "`leathers/user-ctor-required` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_USER_CTOR_REQUIRED_ 18 | #endif 19 | 20 | #if (BOOST_COMP_MSVC) 21 | # pragma warning(disable: 4610) 22 | #endif 23 | -------------------------------------------------------------------------------- /Source/leathers/weak-vtables: -------------------------------------------------------------------------------- 1 | // This file generated automatically: 2 | // https://github.com/ruslo/sugar/wiki/Cross-platform-warning-suppression 3 | 4 | // Copyright (c) 2014, Ruslan Baratov 5 | // All rights reserved. 6 | 7 | #if !defined(LEATHERS_PUSH_) 8 | # error "`leathers/weak-vtables` used " 9 | "without `leathers/push`, " 10 | "see README.txt for more info" 11 | #endif 12 | 13 | #if defined(LEATHERS_WEAK_VTABLES_) 14 | # error "`leathers/weak-vtables` " 15 | "already included; see README.txt for more info" 16 | #else 17 | # define LEATHERS_WEAK_VTABLES_ 18 | #endif 19 | 20 | #if (BOOST_COMP_CLANG) 21 | # if __has_warning("-Wweak-vtables") 22 | # pragma clang diagnostic ignored "-Wweak-vtables" 23 | # endif 24 | #endif 25 | -------------------------------------------------------------------------------- /Source/sugar.cmake: -------------------------------------------------------------------------------- 1 | # This file generated automatically by: 2 | # generate_sugar_files.py 3 | # see wiki for more info: 4 | # https://github.com/ruslo/sugar/wiki/Collecting-sources 5 | 6 | if(DEFINED LEATHERS_SOURCE_SUGAR_CMAKE_) 7 | return() 8 | else() 9 | set(LEATHERS_SOURCE_SUGAR_CMAKE_ 1) 10 | endif() 11 | 12 | include(sugar_files) 13 | include(sugar_include) 14 | 15 | sugar_include(examples) 16 | sugar_include(leathers) 17 | -------------------------------------------------------------------------------- /cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | find_package(Boost CONFIG REQUIRED) 4 | find_package(sugar CONFIG REQUIRED) 5 | 6 | include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") 7 | check_required_components("@PROJECT_NAME@") 8 | -------------------------------------------------------------------------------- /docs/Building-universal-ios-library.md: -------------------------------------------------------------------------------- 1 | ### Overview 2 | Universal library (multi-architecture library, fat library) is a library that contains several architectures. 3 | Usually you can build library simply adding two or more `-arch` arguments: 4 | ```bash 5 | > cat foo.cpp 6 | int foo() { 7 | return 0x42; 8 | } 9 | > clang++ -arch x86_64 -arch armv7 -c foo.cpp -o foo.a 10 | > file foo.a 11 | foo.a: Mach-O universal binary with 2 architectures 12 | foo.a (for architecture x86_64): Mach-O 64-bit object x86_64 13 | foo.a (for architecture armv7): Mach-O object arm 14 | ``` 15 | But not for ios (: 16 | 17 | Different `isysroot` paths used during `iphoneos` and `iphonesimulator` compilation: 18 | ```bash 19 | -isysroot /.../Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk 20 | -isysroot /.../Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk 21 | ``` 22 | `clang` does not support multiple `isysroot` arguments, so you need to build every library individually and link them all together using [lipo](http://www.unix.com/man-page/osx/1/lipo/): 23 | ```bash 24 | > lipo -output universal.a -create lib_x86_64.a lib_armv7.a 25 | ``` 26 | ~~Additionally `install` cmake command [not working](http://public.kitware.com/Bug/view.php?id=12506) for `ios` targets.~~ Patched CMake version can be used to install universal libraries (`ios-universal*`): 27 | * https://github.com/ruslo/CMake/releases 28 | 29 | ### Example (building universal library) 30 | 31 | Copy `sugar` library and set environment variable `SUGAR_ROOT`: 32 | ```bash 33 | > git clone https://github.com/ruslo/sugar 34 | > cd sugar 35 | > export SUGAR_ROOT=`pwd` # examples use this variable 36 | > cd examples/06-ios/_universal_library/ 37 | ``` 38 | Generate `Xcode` project with install prefix equals to example root directory (this is where 39 | other examples found this library): 40 | ```bash 41 | > cmake -H. -B_builds/xcode -GXcode -DCMAKE_INSTALL_PREFIX="`pwd`/install" 42 | ``` 43 | 44 | install library: 45 | ```bash 46 | > cmake --build _builds/xcode --target install --config Release 47 | > cmake --build _builds/xcode --target install --config Debug 48 | ... 49 | ** BUILD SUCCEEDED ** 50 | -- [iOS universal] Install done: /.../sugar/examples/06-ios/_universal_library/install/lib/libfood.a 51 | ... 52 | ``` 53 | Check installed files: 54 | ```bash 55 | > ls install/include/ 56 | A.hpp 57 | > ls install/lib/ 58 | cmake/ libfoo.a libfood.a 59 | > lipo -info install/lib/libfoo.a 60 | Architectures in the fat file: install/lib/libfoo.a are: i386 x86_64 armv7 armv7s arm64 61 | ``` 62 | 63 | ### Example (linking libraries using find_package) 64 | If you use this library not in one project, you can encapsulate all library/headers setting work inside `FooConfig.cmake` file and load this file using `find_package`: 65 | ```cmake 66 | find_package(Foo CONFIG) 67 | ``` 68 | This will import `Foo::foo` target and reduce amount of boilerplate code. 69 | 70 | ```bash 71 | > cd .. 72 | > cd link_package 73 | > cmake -H. -B_builds/xcode -GXcode 74 | ``` 75 | Note that for sake of simplicity `CMAKE_INSTALL_PREFIX` set inside `CMakeLists.txt`. More realistic 76 | example of `find_package(... CONFIG)` can be found [here](https://github.com/forexample/package-example). 77 | 78 | Open project in Xcode and build/test different configurations: 79 | ```bash 80 | > open _builds/xcode/06-example-ios.link_package.xcodeproj 81 | ``` 82 | 83 | If you run application in `Debug` mode output will be: 84 | * `Hello from libfood.a (debug)` 85 | 86 | and if `Release`: 87 | 88 | * `Hello from libfoo.a (release)` -------------------------------------------------------------------------------- /docs/Collecting-sources.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | CMake provides several mechanisms for collecting targets source files: 3 | * [file(GLOB ...)](http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:file) 4 | * [aux_source_directory](http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:aux_source_directory) 5 | * [add_library(... OBJECT ...)](http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:add_library) 6 | * Explicit listing in `CMakeLists.txt` 7 | 8 | Each of them suffers from different problems: 9 | * `file(GLOB *)` and `aux_source_directory` 10 | * Well-known problem described in documentation: 11 |
 12 | We do not recommend using GLOB to collect a list of source files from your source tree.
 13 | If no CMakeLists.txt file changes when a source is added or removed then the generated
 14 | build system cannot know when to ask CMake to regenerate.
 15 | 
16 | * Even if careful programmer is okay with running cmake every time when file structure has been changed, you now not able to use automatic tools efficiently anymore (like [git-bisect](http://git-scm.com/docs/git-bisect)). You must not forget to **force all** project regeneration before every test. 17 | * Sometimes it's hard to describe the criteria of selection of sources. For example, files may not have extension like 18 | [STL sources](http://en.cppreference.com/w/cpp/header/algorithm), directory can hold different groups of files, e.g. sources, mock-object, unit tests, resources... you may want to pick some files only if option enabled, etc. 19 | 20 | * `add_library(... OBJECT ...)` 21 | * This function is not recursive. If you try to create "object library" with sources from another "object library", 22 | you'll get the error: 23 |
 24 | Only executables and non-OBJECT libraries may reference target objects.
 25 | 
26 | * You can use "object library" only for creating target, but, for example, you are not able to set `COMPILE_DEFINITIONS` or `MACOSX_PACKAGE_LOCATION` source property 27 | * It is a **target**, so you need to invent names for all temporary "object library" targets and to watch 28 | that there are no collisions occured. As far as target name is global, you can't create `templib` somewhere deeper 29 | in `A` directory and create one more in `B` directory 30 | 31 | * explicit listing in `CMakeLists.txt` 32 | * Well, that's why previous solutions exist (: if you got a lot of files in project and list them all 33 | while creating target, soon your `CMakeLists.txt` will become unnavigatable and inflexible 34 | * There are some restrictions in reading variables across directories: 35 | * Example 1: 36 | ```cmake 37 | # CMakeLists.txt 38 | cmake_minimum_required(VERSION 2.8.4) 39 | project(proj) 40 | add_subdirectory(A) 41 | add_subdirectory(B) 42 | ``` 43 | ```cmake 44 | # A/CMakeLists.txt 45 | set(COMMON_SOURCES a.cpp) 46 | ``` 47 | ```cmake 48 | # B/CMakeLists.txt 49 | message("common sources: '${COMMON_SOURCES}'") 50 | ``` 51 | If you run `cmake`, output will be `common sources: ''` because variable has been updated only inside directory `A`. 52 | You can fix it by adding [PARENT_SCOPE](http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:set): 53 | ```cmake 54 | # A/CMakeLists.txt 55 | set(COMMON_SOURCES a.cpp PARENT_SCOPE) 56 | ``` 57 | * But now you need to set `COMMON_SOURCES` in every intermediate directory, even if `CMakeLists.txt` not 58 | using it explicitly. Example 2: 59 | ```cmake 60 | # A/CMakeLists.txt 61 | add_subdirectory(C) 62 | set(COMMON_SOURCES ${COMMON_SOURCES} PARENT_SCOPE) # if you remove this, variable will be lost 63 | ``` 64 | ```cmake 65 | # A/C/CMakeLists.txt 66 | set(COMMON_SOURCES a.cpp PARENT_SCOPE) 67 | ``` 68 | * And even if this okay, you can't update variables simultaneously in two subdirectories. Directory that 69 | parsed first is not able to see any variables from directory which parsed second. Example 3: 70 | ```cmake 71 | # A/CMakeLists.txt 72 | set(COMMON_SOURCES_A a.cpp PARENT_SCOPE) 73 | message("from A: ${COMMON_SOURCES_A}") 74 | message("from A: ${COMMON_SOURCES_B}") 75 | ``` 76 | ```cmake 77 | # B/CMakeLists.txt 78 | set(COMMON_SOURCES_B b.cpp PARENT_SCOPE) 79 | message("from B: ${COMMON_SOURCES_A}") 80 | message("from B: ${COMMON_SOURCES_B}") 81 | ``` 82 | Output depends on order of directories' listing inside the top `CMakeLists.txt` file and may be: 83 | ``` 84 | from A: 85 | from A: 86 | from B: a.cpp 87 | from B: 88 | ``` 89 | or 90 | ``` 91 | from B: 92 | from B: 93 | from A: 94 | from A: b.cpp 95 | ``` 96 | 97 | # Separating Concepts 98 | Take a look at your `CMakeLists.txt` file. What you see? (: Adding compile flags, definitions, searching libraries, checking options, ... let's call it `tuning`. Plus, of course, collecting sources for targets, let's call it `listing`: 99 | ![intro](https://raw.github.com/ruslo/sugar/master/wiki/images/collecting/png/intro-tuning-listing.png) 100 | Let's make it in two steps: 101 | * Imagine that all variables already contain all source lists: 102 | ![listing](https://raw.github.com/ruslo/sugar/master/wiki/images/collecting/png/listing.png) 103 | * Tune your project: 104 | ![tuning](https://raw.github.com/ruslo/sugar/master/wiki/images/collecting/png/tuning.png) 105 | 106 | Note that: 107 | * Variable `SRC_3` can be used inside `C` directory even if `SRC_3` defined in `D` 108 | * Directory `A` is not holding any `CMakeLists.txt` file anymore 109 | 110 | # Implementation 111 | Magic can be achieved using [two](https://github.com/ruslo/sugar/tree/master/cmake/collecting) macroses: [sugar_files](https://github.com/ruslo/sugar/tree/master/cmake/collecting#sugar_files) and [sugar_include](https://github.com/ruslo/sugar/tree/master/cmake/collecting#sugar_include), and one file `sugar.cmake`: 112 | ![sugar](https://raw.github.com/ruslo/sugar/master/wiki/images/collecting/png/sugar.png) 113 | 114 | * `sugar_files` 115 | * Add files from current directory (usually) to given variable. `list(APPEND ...)` command has been used, i.e. `SRC_1` from `A` and `C` directories will be merged, but not overwriten 116 | * On adding file, relative path converted to absolute, so variable can further be used in any directory 117 | * `sugar_include` 118 | * processes `sugar.cmake` file from given directory 119 | * uses cmake `include` command, so all variables `SRC_*` defined in the same scope. Note that `SRC_3` is visible even if `B` directory is not using it 120 | * Note that `sugar.cmake` is a separate file and you can have `CMakeLists.txt` and `sugar.cmake` in one directory simultaneously 121 | 122 | # Pros 123 | * No cache variables, no additional properties, just `include` + `list(APPEND ...)` 124 | * Implementation based on pure-cmake macro without any external tools. As a result `sugar.cmake` is a cmake file and you, for example, can easily test some variables: 125 | ```cmake 126 | # inside sugar.cmake 127 | if(UNIX) 128 | sugar_files( 129 | TARGET_A_SOURCES 130 | A_unix.cpp 131 | A_unix.hpp 132 | ) 133 | else() 134 | sugar_files( 135 | TARGET_A_SOURCES 136 | A_non_unix.cpp 137 | A_non_unix.hpp 138 | ) 139 | endif() 140 | ``` 141 | * `sugar.cmake` file is included, so if you update source structure, cmake will run generator **automatically** 142 | * Files listed explicitly: 143 | ```cmake 144 | sugar_include(A) 145 | sugar_include(B) 146 | # sugar_include(C) # no, files from C not needed 147 | 148 | sugar_files( 149 | TARGET_A_SOURCES 150 | A.cpp 151 | B.cpp 152 | # C.cpp # no, this file is not source, it's some example 153 | ) 154 | 155 | sugar_files( 156 | TARGET_A_HEADERS 157 | A.hpp 158 | some_file_without_extension 159 | ) 160 | 161 | sugar_files( 162 | TARGET_A_MOCKS 163 | A_mock_object.cpp # used only for testing 164 | ) 165 | ``` 166 | * Files listed locally: 167 | ```cmake 168 | # this file can be easily verified by simple ls command: 169 | # > ls . 170 | # A/ B/ OtherDir/ some_file.cpp some_file.hpp 171 | sugar_include(A) 172 | sugar_include(B) 173 | sugar_include(OtherDir) 174 | 175 | sugar_files( 176 | SOURCES 177 | some_file.cpp 178 | some_file.hpp 179 | some_file.cxx # Where it comes from? There is no such file! 180 | ) 181 | ``` 182 | * Unlike "object library", variables can be used for any purpose: 183 | ```cmake 184 | # inside some CMakeLists.txt 185 | sugar_include(A) # update SOURCES and RESOURCES variables 186 | set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS "-Wall") 187 | set_source_files_properties(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) 188 | ``` 189 | * No temporary names, concept uses only names that you need 190 | * First try to focus on source listing. When done, focus on project tuning 191 | * Vice versa, when tuning done, focus on source listing. When file `A/foo.cpp` added, modify `A/sugar.cmake` only, no need to modify other files 192 | 193 | # Usage 194 | Typical `sugar.cmake` file: 195 | ```cmake 196 | # sugar.cmake is an include file, so header guards required 197 | # to prevent collisions make guard variable name like that: __SUGAR_CMAKE_ 198 | # (compare to C++: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml, see 'The #define Guard') 199 | if(defined MY_PROJECT_DIR_A_SUBDIR_B_) 200 | return() 201 | else() 202 | set(MY_PROJECT_DIR_A_SUBDIR_B_ 1) 203 | endif() 204 | 205 | # load 'sugar_include.cmake' and 'sugar_files.cmake' modules with 'sugar_include' and 'sugar_files' macroses 206 | include(sugar_include) 207 | include(sugar_files) 208 | 209 | # list directories 210 | sugar_include(DirectoryFoo) 211 | sugar_include(DirectoryBoo) 212 | 213 | # list files 214 | sugar_files( 215 | TARGET_MYLIB_SOURCES # tie source variable to target name for clearness and to prevent names collision 216 | foo.cpp # list only local files for easy verification 217 | boo.cpp 218 | ) 219 | 220 | sugar_files( 221 | TARGET_MYBIN_SOURCES 222 | xxx.cpp 223 | yyy.cpp 224 | ) 225 | 226 | sugar_files( 227 | MYPROJECT_RESOURCES 228 | cat.png 229 | girl.jpeg 230 | ) 231 | ``` 232 | Take a look at [this](https://github.com/ruslo/sugar/blob/master/python/generate_sugar_files.py) script if 233 | you need to generate files from empty project: 234 | ```bash 235 | > ls ./myproj_dir/A/ 236 | C/ CMakeLists.txt boo.hpp foo.cpp 237 | > generate_sugar_files.py --top ./myproj_dir/ --var MYPROJ_SOURCES 238 | > cat ./myproj_dir/A/sugar.cmake 239 | # This file generated automatically by: 240 | # generate_sugar_files.py 241 | # see wiki for more info: 242 | # https://github.com/ruslo/sugar/wiki/Collecting-sources 243 | 244 | if(DEFINED MYPROJ_DIR_A_SUGAR_CMAKE_) 245 | return() 246 | else() 247 | set(MYPROJ_DIR_A_SUGAR_CMAKE_ 1) 248 | endif() 249 | 250 | include(sugar_files) 251 | include(sugar_include) 252 | 253 | sugar_include(C) 254 | 255 | sugar_files( 256 | MYPROJ_SOURCES 257 | boo.hpp 258 | foo.cpp 259 | ) 260 | ``` 261 | 262 | # Examples 263 | * Examples can be found [here](https://github.com/ruslo/sugar/tree/master/examples) 264 | * Start from [simple](https://github.com/ruslo/sugar/tree/master/examples/01-simple) one file project 265 | * Listing [common](https://github.com/ruslo/sugar/tree/master/examples/02-common) sources from different subdirectories without any visibility problem described in [overview 1-3](#overview) 266 | * [this](https://github.com/ruslo/sugar/tree/master/examples/06-ios/empty_application) and [this](https://github.com/ruslo/sugar/tree/master/examples/06-ios/single_view_application) example 267 | use same image resources selected by `sugar_include` from [external](https://github.com/ruslo/sugar/tree/master/examples/resources/ios/images) directory 268 | -------------------------------------------------------------------------------- /docs/Cross-platform-warning-suppression.md: -------------------------------------------------------------------------------- 1 | Function [sugar_generate_warning_flags][1] helps to generate compiler flags to control 2 | warnings in cross-platform way. 3 | 4 | ### Description 5 | ```cmake 6 | sugar_generate_warning_flags( 7 | RESULT_COMPILE_OPTIONS # name of the resulting list of flags for COMPILE_OPTIONS target property 8 | RESULT_PROPERTIES # name of the resulting list of target properties and values 9 | DISABLE [warn1 warn2 ... | ALL] # type of warnings to suppress 10 | ENABLE [warn1 warn2 ... | ALL] # type of warnings to enable 11 | TREAT_AS_ERROR [warn1 warn2 ... | ALL] # these warnings will be treated as errors 12 | CLEAR_GLOBAL # remove warning-control flags from global 13 | # variables like CMAKE_CXX_FLAGS to avoid potential conflicts 14 | ) 15 | ``` 16 | 17 | * [List][2] of available warnings. 18 | * `DISABLE ALL`: `/w /W0` (MSVC), `-w`(GCC/Clang) 19 | * `ENABLE ALL`: `/Wall` (MSVC), `-Wall -Wextra -Wpedantic` (GCC), `-Wall -Weverything -pedantic` (Clang) 20 | * `TREAT_AS_ERROR ALL`: `/WX` (MSVC), `-Werror` (GCC/Clang) 21 | 22 | ### Usage 23 | ```cmake 24 | sugar_generate_warning_flags( 25 | target_compile_options 26 | target_properties 27 | ENABLE shadow 28 | TREAT_AS_ERRORS ALL 29 | ) 30 | 31 | set_target_properties( 32 | foo 33 | PROPERTIES 34 | ${target_properties} # important: without quotes (properties: name, value, name, value, ...) 35 | COMPILE_OPTIONS 36 | "${target_compile_options}" # important: need quotes (one argument for COMPILE_OPTIONS) 37 | ) 38 | ``` 39 | 40 | * Xcode generator (clang): 41 | * target_properties `XCODE_ATTRIBUTE_GCC_WARN_SHADOW YES` 42 | * target_compile_options `-Werror` 43 | * Makefile generator (clang/gcc): 44 | * target_properties ` ` 45 | * target_compile_options `-Wshadow -Werror` 46 | 47 | ### Clear global 48 | 49 | CMake variables like CMAKE_CXX_FLAGS contains warning-control flags by default. This may result a conflict. 50 | To avoid such situations use CLEAR_GLOBAL sub-option: 51 | 52 | ```cmake 53 | message("old flags: ${CMAKE_CXX_FLAGS}") 54 | sugar_generate_warning_flags(flags DISABLE ALL CLEAR_GLOBAL) 55 | message("new flags: ${CMAKE_CXX_FLAGS}") 56 | ``` 57 | 58 | MSVC output (note that not warning-specific flags stay unchanged): 59 | ``` 60 | old flags: /DWIN32 /D_WINDOWS /W3 /GR /EHsc 61 | new flags: /DWIN32 /D_WINDOWS /GR /EHsc 62 | ``` 63 | 64 | ### Partial source 65 | 66 | This CMake function can be used to enable or suppress target/source specific warnings. 67 | To suppress warnings inside file (for example for one or two lines) [this][3] companion C++ library can be used. 68 | 69 | ### Generator 70 | * All files (C++ headers, CMake functions and wiki table) generated by python [script][4]: 71 | ```bash 72 | > ./sugar-generate-warnings.py 73 | > ls sugar_* 74 | sugar_generate_warning_flag_by_name.cmake 75 | sugar_generate_warning_xcode_attr_by_name.cmake 76 | sugar_get_all_xcode_warning_attrs.cmake 77 | > ls wiki-table.txt 78 | wiki-table.txt 79 | > ls leathers/ 80 | all ... pop ... push ... enum-conversion ... conversion ... 81 | ``` 82 | 83 | [1]: https://github.com/ruslo/sugar/tree/master/cmake/core#sugar_generate_warning_flags 84 | [2]: https://github.com/ruslo/leathers/wiki/List 85 | [3]: https://github.com/ruslo/leathers 86 | [4]: https://github.com/ruslo/sugar/blob/master/python/sugar-generate-warnings.py -------------------------------------------------------------------------------- /docs/Examples-testing.md: -------------------------------------------------------------------------------- 1 | This [script](https://github.com/ruslo/sugar/blob/master/examples/test.py) help to test examples build (build project + project compiling) using different [generators](http://www.cmake.org/cmake/help/v2.8.11/cmake.html#section_Generators) and [configurations](http://www.cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_BUILD_TYPE). 2 | 3 | ### Current 4 | * Current tested generators: `Unix Makefiles` and `Xcode` (if mac os detected). 5 | * Current tested build types: default (no type specification), `Debug`, `Release`. 6 | 7 | ### Setup 8 | Script `test.py` use some [external](https://github.com/ruslo/configs/tree/master/python/detail) modules. 9 | You need to load it and set `GITENV_ROOT` variable. All steps can look like this: 10 | ```bash 11 | > git clone https://github.com/ruslo/gitenv && cd gitenv 12 | > export GITENV_ROOT=`pwd` 13 | > git submodule update --init ./configs/ ./sugar/ 14 | > git submodule foreach 'git checkout master' 15 | > ./sugar/examples/test.py 16 | ``` 17 | 18 | *Note*: for [libc++](http://libcxx.llvm.org/) linkage use `--libcxx` option 19 | 20 | ### Directory testing 21 | You can test directories which only fit some pattern. For example: 22 | ```bash 23 | > ./test.py --include ./02-common/ 24 | ... 25 | DONE LIST: 26 | dir = ./02-common, generator = Unix Makefiles 27 | dir = ./02-common, generator = Unix Makefiles 28 | dir = ./02-common, generator = Unix Makefiles 29 | dir = ./02-common, generator = Xcode 30 | ``` 31 | Note, that pattern `02-common` not fit `./02-common`: 32 | ```bash 33 | > ./test.py --dir 02-common/ 34 | skip "./02-common" directory (not fit "02-common") 35 | ``` 36 | 37 | Also you can exclude some directories from build: 38 | ```bash 39 | > ./test.py --exclude ./00-detect ./01-simple 40 | exclude directories: ['./00-detect', './01-simple'] 41 | skip "./00-detect" directory (excluded) 42 | skip "./01-simple" directory (excluded) 43 | ``` -------------------------------------------------------------------------------- /docs/Generating-groups.md: -------------------------------------------------------------------------------- 1 | | disabled | enabled | 2 | |----------|---------| 3 | | ![disabled](https://raw.github.com/ruslo/sugar/master/wiki/images/groups-generation-disabled.png) | ![enabled](https://raw.github.com/ruslo/sugar/master/wiki/images/enable-groups-generator.png) | 4 | -------------------------------------------------------------------------------- /docs/Pitfalls.md: -------------------------------------------------------------------------------- 1 | #### Suppress pragma duplication 2 | ```cpp 3 | #include 4 | #include 5 | #include // <--- redundant, probably error 6 | // some code 7 | #include 8 | ``` 9 | Error: 10 | ``` 11 | .../leathers/format:..:.: error: 12 | "`leathers/format` already included; see README.txt for more info" 13 | ``` 14 | 15 | #### Push pragma duplication 16 | ```cpp 17 | #include 18 | #include // <--- redundant, already "pushed", probably error 19 | #include 20 | // some code 21 | #include 22 | ``` 23 | Error: 24 | ``` 25 | .../leathers/push:..:.: error: "Not ending 'leathers/push' include detected;" 26 | ``` 27 | 28 | #### Best practices 29 | To avoid last two pitfalls just remember to **not** "push"/"pop"-ing **before** include directive: 30 | ```cpp 31 | #include 32 | #include 33 | #include // surprise! suppressing warnings in `Foo.hpp` file 34 | #include // what if there is another 'leathers/push' inside Boo.hpp? 35 | ``` 36 | 37 | #### Broken 38 | This warnings is broken on Visual Studio (bugs closed as `WONTFIX`): 39 | * [4514](https://connect.microsoft.com/VisualStudio/feedback/details/893419) (unreferenced-inline) 40 | * [4503](https://connect.microsoft.com/VisualStudio/feedback/details/898267) (decorated name length exceeded ...) 41 | * [4710](https://connect.microsoft.com/VisualStudio/feedback/details/898281) (function not inlined) 42 | * 4714 (marked as __forceinline not inlined) -------------------------------------------------------------------------------- /docs/Used-variables.md: -------------------------------------------------------------------------------- 1 | ### SUGAR_STATUS_PRINT 2 | Option with default value `TRUE`. If this variable is set to `TRUE` process information will be printed. 3 | See [sugar_status_print](https://github.com/ruslo/sugar/tree/master/cmake/print#sugar_status_print) 4 | 5 | ### SUGAR_STATUS_DEBUG 6 | Option with default value `FALSE`. Works like `SUGAR_STATUS_PRINT` (more verbose). Additionally some debug check performed if this variable is setted to `TRUE` (which can be usually slow, like checking file existence). 7 | See [sugar_status_debug](https://github.com/ruslo/sugar/tree/master/cmake/print#sugar_status_debug) 8 | 9 | ### SUGAR_SOURCES 10 | List of `sugar_*.cmake` files used in project collected by [sugar_add_this_to_sourcelist](https://github.com/ruslo/sugar/blob/master/cmake/core/sugar_add_this_to_sourcelist.cmake) command. 11 | 12 | ### SUGAR_ROOT 13 | This variable setted automatically after incuding master [Sugar](https://github.com/ruslo/sugar/tree/master/cmake#master-file) file. 14 | 15 | ### SUGAR_IOS_ARCH 16 | Optimization for iOS targets building. More [info] 17 | (https://github.com/ruslo/sugar/wiki/Universal-ios-library-%28optimization%29#sugar_ios_arch). -------------------------------------------------------------------------------- /docs/ios-simulator.md: -------------------------------------------------------------------------------- 1 | ### TODO 2 | ```bash 3 | wget https://github.com/phonegap/ios-sim/archive/1.8.2.tar.gz 4 | unpack.py 1.8.2.tar.gz 5 | ios-sim-1.8.2/ 6 | xcodebuild -configuration Release -target ios-sim 7 | ./build/Release/ios-sim --launch /.../_builds/xcode/Debug-iphonesimulator/example.app --stdout debug.output 8 | ``` 9 | https://github.com/phonegap/ios-sim -------------------------------------------------------------------------------- /expected-warnings/clang_libstdcxx.log: -------------------------------------------------------------------------------- 1 | /Source/examples/c++98-compat-pedantic.cpp:12:2: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-pedantic] 2 | /Source/examples/c++98-compat.cpp:8:3: warning: inline namespaces are incompatible with C++98 [-Wc++98-compat] 3 | /Source/examples/cast-aligned.cpp:11:13: warning: cast from 'char *' to 'long *' increases required alignment from 1 to 8 [-Wcast-align] 4 | /Source/examples/cast-aligned.cpp:11:13: warning: use of old-style cast [-Wold-style-cast] 5 | /Source/examples/conditional-uninitialized.cpp:16:10: warning: variable 'result' may be uninitialized when used here [-Wconditional-uninitialized] 6 | /Source/examples/conversion-loss.cpp:19:7: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] 7 | /Source/examples/conversion.cpp:18:5: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 8 | /Source/examples/covered-switch-default.cpp:25:5: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] 9 | /Source/examples/deprecated-declarations.cpp:27:3: warning: 'foo' is deprecated: boo [-Wdeprecated-declarations] 10 | /Source/examples/deprecated-register.cpp:9:3: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register] 11 | /Source/examples/deprecated.cpp:9:14: warning: dynamic exception specifications are deprecated [-Wdeprecated] 12 | /Source/examples/documentation-unknown-command.cpp:8:5: warning: unknown command tag name [-Wdocumentation-unknown-command] 13 | /Source/examples/documentation.cpp:9:5: warning: unknown command tag name 'detail'; did you mean 'details'? [-Wdocumentation] 14 | /Source/examples/extra-semi.cpp:10:4: warning: extra ';' after member function definition [-Wextra-semi] 15 | /Source/examples/global-constructors.cpp:15:5: warning: declaration requires a global constructor [-Wglobal-constructors] 16 | /Source/examples/ill-formed-comma-expr.cpp:11:7: warning: expression result unused [-Wunused-value] 17 | /Source/examples/missing-noreturn.cpp:10:12: warning: function 'foo' could be declared with attribute 'noreturn' [-Wmissing-noreturn] 18 | /Source/examples/non-virtual-dtor.cpp:10:3: warning: 'Foo' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor] 19 | /Source/examples/old-style-cast.cpp:11:13: warning: use of old-style cast [-Wold-style-cast] 20 | /Source/examples/padded.cpp:10:8: warning: padding struct 'Foo' with 7 bytes to align 'y' [-Wpadded] 21 | /Source/examples/shift-sign-overflow.cpp:9:32: warning: signed shift result (0x8000000000000000) sets the sign bit of the shift expression's type ('long') and becomes negative [-Wshift-sign-overflow] 22 | /Source/examples/sign-compare.cpp:11:9: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] 23 | /Source/examples/sign-conversion.cpp:12:10: warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion] 24 | /Source/examples/signed-unsigned-compare.cpp:15:9: warning: comparison of integers of different signs: 'int' and 'unsigned long long' [-Wsign-compare] 25 | /Source/examples/switch-enum.cpp:16:11: warning: enumeration value 'B' not explicitly handled in switch [-Wswitch-enum] 26 | /Source/examples/switch.cpp:16:11: warning: enumeration value 'B' not handled in switch [-Wswitch] 27 | /Source/examples/undef.cpp:8:6: warning: 'VERY_STRANGE_MACRO' is not defined, evaluates to 0 [-Wundef] 28 | /Source/examples/unused-parameter.cpp:10:14: warning: unused parameter 'a' [-Wunused-parameter] 29 | /Source/examples/unused-value.cpp:10:3: warning: expression result unused [-Wunused-value] 30 | /Source/examples/used-but-marked-unused.cpp:20:3: warning: 'Foo' was marked unused but was used [-Wused-but-marked-unused] 31 | /Source/examples/weak-vtables.cpp:8:7: warning: 'Foo' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables] 32 | -------------------------------------------------------------------------------- /expected-warnings/gcc.log: -------------------------------------------------------------------------------- 1 | /Source/examples/deprecated-declarations.cpp:27:3: warning: 'void foo()' is deprecated (declared at /Source/examples/deprecated-declarations.cpp:18): boo [-Wdeprecated-declarations] 2 | /Source/examples/deprecated-declarations.cpp:27:7: warning: 'void foo()' is deprecated (declared at /Source/examples/deprecated-declarations.cpp:18): boo [-Wdeprecated-declarations] 3 | /Source/examples/ill-formed-comma-expr.cpp:11:10: warning: left operand of comma operator has no effect [-Wunused-value] 4 | /Source/examples/sign-compare.cpp:11:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 5 | /Source/examples/signed-unsigned-compare.cpp:15:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 6 | /Source/examples/switch.cpp:16:10: warning: enumeration value 'B' not handled in switch [-Wswitch] 7 | /Source/examples/unused-parameter.cpp:10:6: warning: unused parameter 'a' [-Wunused-parameter] 8 | /Source/examples/unused-value.cpp:10:4: warning: statement has no effect [-Wunused-value] 9 | -------------------------------------------------------------------------------- /expected-warnings/gcc48.log: -------------------------------------------------------------------------------- 1 | /Source/examples/deprecated-declarations.cpp:27:3: warning: 'void foo()' is deprecated (declared at /Source/examples/deprecated-declarations.cpp:18): boo [-Wdeprecated-declarations] 2 | /Source/examples/deprecated-declarations.cpp:27:7: warning: 'void foo()' is deprecated (declared at /Source/examples/deprecated-declarations.cpp:18): boo [-Wdeprecated-declarations] 3 | /Source/examples/ill-formed-comma-expr.cpp:11:10: warning: left operand of comma operator has no effect [-Wunused-value] 4 | /Source/examples/sign-compare.cpp:11:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 5 | /Source/examples/signed-unsigned-compare.cpp:15:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 6 | /Source/examples/switch.cpp:16:10: warning: enumeration value 'B' not handled in switch [-Wswitch] 7 | /Source/examples/unused-parameter.cpp:10:6: warning: unused parameter 'a' [-Wunused-parameter] 8 | /Source/examples/unused-value.cpp:10:4: warning: statement has no effect [-Wunused-value] 9 | -------------------------------------------------------------------------------- /expected-warnings/libcxx.log: -------------------------------------------------------------------------------- 1 | /Source/examples/c++98-compat-pedantic.cpp:12:2: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-pedantic] 2 | /Source/examples/c++98-compat.cpp:8:3: warning: inline namespaces are incompatible with C++98 [-Wc++98-compat] 3 | /Source/examples/cast-aligned.cpp:11:13: warning: cast from 'char *' to 'long *' increases required alignment from 1 to 8 [-Wcast-align] 4 | /Source/examples/cast-aligned.cpp:11:13: warning: use of old-style cast [-Wold-style-cast] 5 | /Source/examples/conditional-uninitialized.cpp:16:10: warning: variable 'result' may be uninitialized when used here [-Wconditional-uninitialized] 6 | /Source/examples/conversion-loss.cpp:19:7: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] 7 | /Source/examples/conversion.cpp:18:5: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wconversion] 8 | /Source/examples/covered-switch-default.cpp:25:5: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] 9 | /Source/examples/covered-switch-default.cpp:26:7: warning: will never be executed [-Wunreachable-code] 10 | /Source/examples/deprecated-declarations.cpp:27:3: warning: 'foo' is deprecated: boo [-Wdeprecated-declarations] 11 | /Source/examples/deprecated-register.cpp:9:3: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register] 12 | /Source/examples/deprecated.cpp:9:14: warning: dynamic exception specifications are deprecated [-Wdeprecated] 13 | /Source/examples/documentation-unknown-command.cpp:8:5: warning: unknown command tag name [-Wdocumentation-unknown-command] 14 | /Source/examples/documentation.cpp:9:5: warning: unknown command tag name 'detail'; did you mean 'details'? [-Wdocumentation] 15 | /Source/examples/extra-semi.cpp:10:4: warning: extra ';' after member function definition [-Wextra-semi] 16 | /Source/examples/global-constructors.cpp:15:5: warning: declaration requires a global constructor [-Wglobal-constructors] 17 | /Source/examples/ill-formed-comma-expr.cpp:11:7: warning: expression result unused [-Wunused-value] 18 | /Source/examples/missing-noreturn.cpp:10:12: warning: function 'foo' could be declared with attribute 'noreturn' [-Wmissing-noreturn] 19 | /Source/examples/non-virtual-dtor.cpp:10:3: warning: 'Foo' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor] 20 | /Source/examples/old-style-cast.cpp:11:13: warning: use of old-style cast [-Wold-style-cast] 21 | /Source/examples/padded.cpp:10:8: warning: padding struct 'Foo' with 7 bytes to align 'y' [-Wpadded] 22 | /Source/examples/shift-sign-overflow.cpp:9:32: warning: signed shift result (0x8000000000000000) sets the sign bit of the shift expression's type ('long') and becomes negative [-Wshift-sign-overflow] 23 | /Source/examples/sign-compare.cpp:11:9: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] 24 | /Source/examples/sign-conversion.cpp:12:10: warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion] 25 | /Source/examples/signed-unsigned-compare.cpp:15:9: warning: comparison of integers of different signs: 'int' and 'unsigned long long' [-Wsign-compare] 26 | /Source/examples/switch-enum.cpp:16:11: warning: enumeration value 'B' not explicitly handled in switch [-Wswitch-enum] 27 | /Source/examples/switch.cpp:16:11: warning: enumeration value 'B' not handled in switch [-Wswitch] 28 | /Source/examples/undef.cpp:8:6: warning: 'VERY_STRANGE_MACRO' is not defined, evaluates to 0 [-Wundef] 29 | /Source/examples/unreachable-code.cpp:11:10: warning: will never be executed [-Wunreachable-code] 30 | /Source/examples/unused-parameter.cpp:10:14: warning: unused parameter 'a' [-Wunused-parameter] 31 | /Source/examples/unused-value.cpp:10:3: warning: expression result unused [-Wunused-value] 32 | /Source/examples/used-but-marked-unused.cpp:20:3: warning: 'Foo' was marked unused but was used [-Wused-but-marked-unused] 33 | /Source/examples/weak-vtables.cpp:8:7: warning: 'Foo' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables] 34 | -------------------------------------------------------------------------------- /expected-warnings/vs32-debug.log: -------------------------------------------------------------------------------- 1 | ..\..\Source\examples\assign-base-inaccessible.cpp(17): warning C4626: 'Boo' : assignment operator could not be generated because a base class assignment operator is inaccessible or deleted [\_builds\ForTesting\example_assign-base-inaccessible.vcxproj] 2 | ..\..\Source\examples\assign-could-not-be-generated.cpp(14): warning C4512: 'Boo' : assignment operator could not be generated [\_builds\ForTesting\example_assign-could-not-be-generated.vcxproj] 3 | ..\..\Source\examples\behavior-change.cpp(29): warning C4350: behavior change: 'B::B(A)' called instead of 'B::B(B &)' [\_builds\ForTesting\example_behavior-change.vcxproj] 4 | ..\..\Source\examples\catch-semantic-changed.cpp(13): warning C4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught [\_builds\ForTesting\example_catch-semantic-changed.vcxproj] 5 | ..\..\Source\examples\constant-conditional.cpp(9): warning C4127: conditional expression is constant [\_builds\ForTesting\example_constant-conditional.vcxproj] 6 | ..\..\Source\examples\conversion-loss.cpp(19): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data [\_builds\ForTesting\example_conversion-loss.vcxproj] 7 | ..\..\Source\examples\conversion-sign-extended.cpp(13): warning C4826: Conversion from 'void *' to 'uint64_t' is sign-extended. This may cause unexpected runtime behavior. [\_builds\ForTesting\example_conversion-sign-extended.vcxproj] 8 | ..\..\Source\examples\conversion.cpp(18): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data [\_builds\ForTesting\example_conversion.vcxproj] 9 | ..\..\Source\examples\copy-ctor-could-not-be-generated.cpp(18): warning C4625: 'Boo' : copy constructor could not be generated because a base class copy constructor is inaccessible or deleted [\_builds\ForTesting\example_copy-ctor-could-not-be-generated.vcxproj] 10 | ..\..\Source\examples\deprecated-declarations.cpp(27): warning C4996: 'foo': was declared deprecated [\_builds\ForTesting\example_deprecated-declarations.vcxproj] 11 | ..\..\Source\examples\dflt-ctor-base-inaccessible.cpp(21): warning C4623: 'Boo' : default constructor could not be generated because a base class default constructor is inaccessible or deleted [\_builds\ForTesting\example_dflt-ctor-base-inaccessible.vcxproj] 12 | ..\..\Source\examples\dflt-ctor-could-not-be-generated.cpp(14): warning C4510: 'Boo' : default constructor could not be generated [\_builds\ForTesting\example_dflt-ctor-could-not-be-generated.vcxproj] 13 | ..\..\Source\examples\digraphs-not-supported.cpp(13): warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '[' [\_builds\ForTesting\example_digraphs-not-supported.vcxproj] 14 | ..\..\Source\examples\ill-formed-comma-expr.cpp(11): warning C4548: expression before comma has no effect; expected expression with side-effect [\_builds\ForTesting\example_ill-formed-comma-expr.vcxproj] 15 | ..\..\Source\examples\inherits-via-dominance.cpp(38): warning C4250: 'Baz' : inherits 'Boo::Boo::foo' via dominance [\_builds\ForTesting\example_inherits-via-dominance.vcxproj] 16 | ..\..\Source\examples\is-defined-to-be.cpp(11): warning C4574: 'FOO' is defined to be '0': did you mean to use '#if FOO'? [\_builds\ForTesting\example_is-defined-to-be.vcxproj] 17 | ..\..\Source\examples\.cpp(11): warning C4619: #pragma warning : there is no warning number '4675' [\_builds\ForTesting\example_.vcxproj] 18 | ..\..\Source\examples\non-virtual-dtor.cpp(11): warning C4265: 'Foo' : class has virtual functions, but destructor is not virtual [\_builds\ForTesting\example_non-virtual-dtor.vcxproj] 19 | ..\..\Source\examples\object-layout-change.cpp(13): warning C4435: 'B' : Object layout under /vd2 will change due to virtual base 'A' [\_builds\ForTesting\example_object-layout-change.vcxproj] 20 | ..\..\Source\examples\padded.cpp(10): warning C4820: 'Foo' : '3' bytes padding added after data member 'Foo::x' [\_builds\ForTesting\example_padded.vcxproj] 21 | ..\..\Source\examples\sign-compare.cpp(11): warning C4389: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_sign-compare.vcxproj] 22 | ..\..\Source\examples\sign-conversion.cpp(12): warning C4365: 'return' : conversion from 'unsigned int' to 'int', signed/unsigned mismatch [\_builds\ForTesting\example_sign-conversion.vcxproj] 23 | ..\..\Source\examples\signed-unsigned-compare.cpp(15): warning C4388: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_signed-unsigned-compare.vcxproj] 24 | ..\..\Source\examples\static-ctor-not-thread-safe.cpp(15): warning C4640: 'foo' : construction of local static object is not thread-safe [\_builds\ForTesting\example_static-ctor-not-thread-safe.vcxproj] 25 | ..\..\Source\examples\switch-enum.cpp(21): warning C4061: enumerator 'B' in switch of enum 'Foo' is not explicitly handled by a case label [\_builds\ForTesting\example_switch-enum.vcxproj] 26 | ..\..\Source\examples\switch.cpp(19): warning C4062: enumerator 'B' in switch of enum 'X' is not handled [\_builds\ForTesting\example_switch.vcxproj] 27 | ..\..\Source\examples\this-used-in-init.cpp(18): warning C4355: 'this' : used in base member initializer list [\_builds\ForTesting\example_this-used-in-init.vcxproj] 28 | ..\..\Source\examples\undef.cpp(8): warning C4668: 'VERY_STRANGE_MACRO' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' [\_builds\ForTesting\example_undef.vcxproj] 29 | ..\..\Source\examples\unsafe-conversion.cpp(17): warning C4191: 'type cast' : unsafe conversion from 'void (__cdecl *)(int)' to 'func' [\_builds\ForTesting\example_unsafe-conversion.vcxproj] 30 | ..\..\Source\examples\unused-parameter.cpp(10): warning C4100: 'a' : unreferenced formal parameter [\_builds\ForTesting\example_unused-parameter.vcxproj] 31 | ..\..\Source\examples\unused-value.cpp(10): warning C4555: expression has no effect; expected expression with side-effect [\_builds\ForTesting\example_unused-value.vcxproj] 32 | ..\..\Source\examples\user-ctor-required.cpp(19): warning C4610: class 'Boo' can never be instantiated - user defined constructor required [\_builds\ForTesting\example_user-ctor-required.vcxproj] 33 | \source\examples\unreachable-code.cpp(11): warning C4702: unreachable code [\_builds\ForTesting\example_unreachable-code.vcxproj] 34 | ..\..\Source\examples\assign-base-inaccessible.cpp(17): warning C4626: 'Boo' : assignment operator could not be generated because a base class assignment operator is inaccessible or deleted [\_builds\ForTesting\example_assign-base-inaccessible.vcxproj] 35 | ..\..\Source\examples\assign-could-not-be-generated.cpp(14): warning C4512: 'Boo' : assignment operator could not be generated [\_builds\ForTesting\example_assign-could-not-be-generated.vcxproj] 36 | ..\..\Source\examples\behavior-change.cpp(29): warning C4350: behavior change: 'B::B(A)' called instead of 'B::B(B &)' [\_builds\ForTesting\example_behavior-change.vcxproj] 37 | ..\..\Source\examples\catch-semantic-changed.cpp(13): warning C4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught [\_builds\ForTesting\example_catch-semantic-changed.vcxproj] 38 | ..\..\Source\examples\constant-conditional.cpp(9): warning C4127: conditional expression is constant [\_builds\ForTesting\example_constant-conditional.vcxproj] 39 | ..\..\Source\examples\conversion-loss.cpp(19): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data [\_builds\ForTesting\example_conversion-loss.vcxproj] 40 | ..\..\Source\examples\conversion-sign-extended.cpp(13): warning C4826: Conversion from 'void *' to 'uint64_t' is sign-extended. This may cause unexpected runtime behavior. [\_builds\ForTesting\example_conversion-sign-extended.vcxproj] 41 | ..\..\Source\examples\conversion.cpp(18): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data [\_builds\ForTesting\example_conversion.vcxproj] 42 | ..\..\Source\examples\copy-ctor-could-not-be-generated.cpp(18): warning C4625: 'Boo' : copy constructor could not be generated because a base class copy constructor is inaccessible or deleted [\_builds\ForTesting\example_copy-ctor-could-not-be-generated.vcxproj] 43 | ..\..\Source\examples\deprecated-declarations.cpp(27): warning C4996: 'foo': was declared deprecated [\_builds\ForTesting\example_deprecated-declarations.vcxproj] 44 | ..\..\Source\examples\dflt-ctor-base-inaccessible.cpp(21): warning C4623: 'Boo' : default constructor could not be generated because a base class default constructor is inaccessible or deleted [\_builds\ForTesting\example_dflt-ctor-base-inaccessible.vcxproj] 45 | ..\..\Source\examples\dflt-ctor-could-not-be-generated.cpp(14): warning C4510: 'Boo' : default constructor could not be generated [\_builds\ForTesting\example_dflt-ctor-could-not-be-generated.vcxproj] 46 | ..\..\Source\examples\digraphs-not-supported.cpp(13): warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '[' [\_builds\ForTesting\example_digraphs-not-supported.vcxproj] 47 | ..\..\Source\examples\ill-formed-comma-expr.cpp(11): warning C4548: expression before comma has no effect; expected expression with side-effect [\_builds\ForTesting\example_ill-formed-comma-expr.vcxproj] 48 | ..\..\Source\examples\inherits-via-dominance.cpp(38): warning C4250: 'Baz' : inherits 'Boo::Boo::foo' via dominance [\_builds\ForTesting\example_inherits-via-dominance.vcxproj] 49 | ..\..\Source\examples\is-defined-to-be.cpp(11): warning C4574: 'FOO' is defined to be '0': did you mean to use '#if FOO'? [\_builds\ForTesting\example_is-defined-to-be.vcxproj] 50 | ..\..\Source\examples\.cpp(11): warning C4619: #pragma warning : there is no warning number '4675' [\_builds\ForTesting\example_.vcxproj] 51 | ..\..\Source\examples\non-virtual-dtor.cpp(11): warning C4265: 'Foo' : class has virtual functions, but destructor is not virtual [\_builds\ForTesting\example_non-virtual-dtor.vcxproj] 52 | ..\..\Source\examples\object-layout-change.cpp(13): warning C4435: 'B' : Object layout under /vd2 will change due to virtual base 'A' [\_builds\ForTesting\example_object-layout-change.vcxproj] 53 | ..\..\Source\examples\padded.cpp(10): warning C4820: 'Foo' : '3' bytes padding added after data member 'Foo::x' [\_builds\ForTesting\example_padded.vcxproj] 54 | ..\..\Source\examples\sign-compare.cpp(11): warning C4389: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_sign-compare.vcxproj] 55 | ..\..\Source\examples\sign-conversion.cpp(12): warning C4365: 'return' : conversion from 'unsigned int' to 'int', signed/unsigned mismatch [\_builds\ForTesting\example_sign-conversion.vcxproj] 56 | ..\..\Source\examples\signed-unsigned-compare.cpp(15): warning C4388: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_signed-unsigned-compare.vcxproj] 57 | ..\..\Source\examples\static-ctor-not-thread-safe.cpp(15): warning C4640: 'foo' : construction of local static object is not thread-safe [\_builds\ForTesting\example_static-ctor-not-thread-safe.vcxproj] 58 | ..\..\Source\examples\switch-enum.cpp(21): warning C4061: enumerator 'B' in switch of enum 'Foo' is not explicitly handled by a case label [\_builds\ForTesting\example_switch-enum.vcxproj] 59 | ..\..\Source\examples\switch.cpp(19): warning C4062: enumerator 'B' in switch of enum 'X' is not handled [\_builds\ForTesting\example_switch.vcxproj] 60 | ..\..\Source\examples\this-used-in-init.cpp(18): warning C4355: 'this' : used in base member initializer list [\_builds\ForTesting\example_this-used-in-init.vcxproj] 61 | ..\..\Source\examples\undef.cpp(8): warning C4668: 'VERY_STRANGE_MACRO' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' [\_builds\ForTesting\example_undef.vcxproj] 62 | ..\..\Source\examples\unsafe-conversion.cpp(17): warning C4191: 'type cast' : unsafe conversion from 'void (__cdecl *)(int)' to 'func' [\_builds\ForTesting\example_unsafe-conversion.vcxproj] 63 | ..\..\Source\examples\unused-parameter.cpp(10): warning C4100: 'a' : unreferenced formal parameter [\_builds\ForTesting\example_unused-parameter.vcxproj] 64 | ..\..\Source\examples\unused-value.cpp(10): warning C4555: expression has no effect; expected expression with side-effect [\_builds\ForTesting\example_unused-value.vcxproj] 65 | ..\..\Source\examples\user-ctor-required.cpp(19): warning C4610: class 'Boo' can never be instantiated - user defined constructor required [\_builds\ForTesting\example_user-ctor-required.vcxproj] 66 | \source\examples\unreachable-code.cpp(11): warning C4702: unreachable code [\_builds\ForTesting\example_unreachable-code.vcxproj] 67 | -------------------------------------------------------------------------------- /expected-warnings/vs64-debug.log: -------------------------------------------------------------------------------- 1 | ..\..\Source\examples\assign-base-inaccessible.cpp(17): warning C4626: 'Boo' : assignment operator could not be generated because a base class assignment operator is inaccessible or deleted [\_builds\ForTesting\example_assign-base-inaccessible.vcxproj] 2 | ..\..\Source\examples\assign-could-not-be-generated.cpp(14): warning C4512: 'Boo' : assignment operator could not be generated [\_builds\ForTesting\example_assign-could-not-be-generated.vcxproj] 3 | ..\..\Source\examples\behavior-change.cpp(29): warning C4350: behavior change: 'B::B(A)' called instead of 'B::B(B &)' [\_builds\ForTesting\example_behavior-change.vcxproj] 4 | ..\..\Source\examples\catch-semantic-changed.cpp(13): warning C4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught [\_builds\ForTesting\example_catch-semantic-changed.vcxproj] 5 | ..\..\Source\examples\constant-conditional.cpp(9): warning C4127: conditional expression is constant [\_builds\ForTesting\example_constant-conditional.vcxproj] 6 | ..\..\Source\examples\conversion-loss.cpp(19): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data [\_builds\ForTesting\example_conversion-loss.vcxproj] 7 | ..\..\Source\examples\conversion.cpp(18): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data [\_builds\ForTesting\example_conversion.vcxproj] 8 | ..\..\Source\examples\copy-ctor-could-not-be-generated.cpp(18): warning C4625: 'Boo' : copy constructor could not be generated because a base class copy constructor is inaccessible or deleted [\_builds\ForTesting\example_copy-ctor-could-not-be-generated.vcxproj] 9 | ..\..\Source\examples\deprecated-declarations.cpp(27): warning C4996: 'foo': was declared deprecated [\_builds\ForTesting\example_deprecated-declarations.vcxproj] 10 | ..\..\Source\examples\dflt-ctor-base-inaccessible.cpp(21): warning C4623: 'Boo' : default constructor could not be generated because a base class default constructor is inaccessible or deleted [\_builds\ForTesting\example_dflt-ctor-base-inaccessible.vcxproj] 11 | ..\..\Source\examples\dflt-ctor-could-not-be-generated.cpp(14): warning C4510: 'Boo' : default constructor could not be generated [\_builds\ForTesting\example_dflt-ctor-could-not-be-generated.vcxproj] 12 | ..\..\Source\examples\digraphs-not-supported.cpp(13): warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '[' [\_builds\ForTesting\example_digraphs-not-supported.vcxproj] 13 | ..\..\Source\examples\ill-formed-comma-expr.cpp(11): warning C4548: expression before comma has no effect; expected expression with side-effect [\_builds\ForTesting\example_ill-formed-comma-expr.vcxproj] 14 | ..\..\Source\examples\inherits-via-dominance.cpp(38): warning C4250: 'Baz' : inherits 'Boo::Boo::foo' via dominance [\_builds\ForTesting\example_inherits-via-dominance.vcxproj] 15 | ..\..\Source\examples\is-defined-to-be.cpp(11): warning C4574: 'FOO' is defined to be '0': did you mean to use '#if FOO'? [\_builds\ForTesting\example_is-defined-to-be.vcxproj] 16 | ..\..\Source\examples\layout-changed.cpp(13): warning C4371: 'Boo' : layout of class may have changed from a previous version of the compiler due to better packing of member 'Boo::mem' [\_builds\ForTesting\example_layout-changed.vcxproj] 17 | ..\..\Source\examples\.cpp(11): warning C4619: #pragma warning : there is no warning number '4675' [\_builds\ForTesting\example_.vcxproj] 18 | ..\..\Source\examples\non-virtual-dtor.cpp(11): warning C4265: 'Foo' : class has virtual functions, but destructor is not virtual [\_builds\ForTesting\example_non-virtual-dtor.vcxproj] 19 | ..\..\Source\examples\object-layout-change.cpp(13): warning C4435: 'B' : Object layout under /vd2 will change due to virtual base 'A' [\_builds\ForTesting\example_object-layout-change.vcxproj] 20 | ..\..\Source\examples\padded.cpp(10): warning C4820: 'Foo' : '3' bytes padding added after data member 'Foo::x' [\_builds\ForTesting\example_padded.vcxproj] 21 | ..\..\Source\examples\sign-compare.cpp(11): warning C4389: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_sign-compare.vcxproj] 22 | ..\..\Source\examples\sign-conversion.cpp(12): warning C4365: 'return' : conversion from 'unsigned int' to 'int', signed/unsigned mismatch [\_builds\ForTesting\example_sign-conversion.vcxproj] 23 | ..\..\Source\examples\signed-unsigned-compare.cpp(15): warning C4388: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_signed-unsigned-compare.vcxproj] 24 | ..\..\Source\examples\static-ctor-not-thread-safe.cpp(15): warning C4640: 'foo' : construction of local static object is not thread-safe [\_builds\ForTesting\example_static-ctor-not-thread-safe.vcxproj] 25 | ..\..\Source\examples\switch-enum.cpp(21): warning C4061: enumerator 'B' in switch of enum 'Foo' is not explicitly handled by a case label [\_builds\ForTesting\example_switch-enum.vcxproj] 26 | ..\..\Source\examples\switch.cpp(19): warning C4062: enumerator 'B' in switch of enum 'X' is not handled [\_builds\ForTesting\example_switch.vcxproj] 27 | ..\..\Source\examples\this-used-in-init.cpp(18): warning C4355: 'this' : used in base member initializer list [\_builds\ForTesting\example_this-used-in-init.vcxproj] 28 | ..\..\Source\examples\undef.cpp(8): warning C4668: 'VERY_STRANGE_MACRO' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' [\_builds\ForTesting\example_undef.vcxproj] 29 | ..\..\Source\examples\unsafe-conversion.cpp(17): warning C4191: 'type cast' : unsafe conversion from 'void (__cdecl *)(int)' to 'func' [\_builds\ForTesting\example_unsafe-conversion.vcxproj] 30 | ..\..\Source\examples\unused-parameter.cpp(10): warning C4100: 'a' : unreferenced formal parameter [\_builds\ForTesting\example_unused-parameter.vcxproj] 31 | ..\..\Source\examples\unused-value.cpp(10): warning C4555: expression has no effect; expected expression with side-effect [\_builds\ForTesting\example_unused-value.vcxproj] 32 | ..\..\Source\examples\user-ctor-required.cpp(19): warning C4610: class 'Boo' can never be instantiated - user defined constructor required [\_builds\ForTesting\example_user-ctor-required.vcxproj] 33 | \source\examples\unreachable-code.cpp(11): warning C4702: unreachable code [\_builds\ForTesting\example_unreachable-code.vcxproj] 34 | ..\..\Source\examples\assign-base-inaccessible.cpp(17): warning C4626: 'Boo' : assignment operator could not be generated because a base class assignment operator is inaccessible or deleted [\_builds\ForTesting\example_assign-base-inaccessible.vcxproj] 35 | ..\..\Source\examples\assign-could-not-be-generated.cpp(14): warning C4512: 'Boo' : assignment operator could not be generated [\_builds\ForTesting\example_assign-could-not-be-generated.vcxproj] 36 | ..\..\Source\examples\behavior-change.cpp(29): warning C4350: behavior change: 'B::B(A)' called instead of 'B::B(B &)' [\_builds\ForTesting\example_behavior-change.vcxproj] 37 | ..\..\Source\examples\catch-semantic-changed.cpp(13): warning C4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught [\_builds\ForTesting\example_catch-semantic-changed.vcxproj] 38 | ..\..\Source\examples\constant-conditional.cpp(9): warning C4127: conditional expression is constant [\_builds\ForTesting\example_constant-conditional.vcxproj] 39 | ..\..\Source\examples\conversion-loss.cpp(19): warning C4242: '=' : conversion from 'int' to 'char', possible loss of data [\_builds\ForTesting\example_conversion-loss.vcxproj] 40 | ..\..\Source\examples\conversion.cpp(18): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data [\_builds\ForTesting\example_conversion.vcxproj] 41 | ..\..\Source\examples\copy-ctor-could-not-be-generated.cpp(18): warning C4625: 'Boo' : copy constructor could not be generated because a base class copy constructor is inaccessible or deleted [\_builds\ForTesting\example_copy-ctor-could-not-be-generated.vcxproj] 42 | ..\..\Source\examples\deprecated-declarations.cpp(27): warning C4996: 'foo': was declared deprecated [\_builds\ForTesting\example_deprecated-declarations.vcxproj] 43 | ..\..\Source\examples\dflt-ctor-base-inaccessible.cpp(21): warning C4623: 'Boo' : default constructor could not be generated because a base class default constructor is inaccessible or deleted [\_builds\ForTesting\example_dflt-ctor-base-inaccessible.vcxproj] 44 | ..\..\Source\examples\dflt-ctor-could-not-be-generated.cpp(14): warning C4510: 'Boo' : default constructor could not be generated [\_builds\ForTesting\example_dflt-ctor-could-not-be-generated.vcxproj] 45 | ..\..\Source\examples\digraphs-not-supported.cpp(13): warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for '[' [\_builds\ForTesting\example_digraphs-not-supported.vcxproj] 46 | ..\..\Source\examples\ill-formed-comma-expr.cpp(11): warning C4548: expression before comma has no effect; expected expression with side-effect [\_builds\ForTesting\example_ill-formed-comma-expr.vcxproj] 47 | ..\..\Source\examples\inherits-via-dominance.cpp(38): warning C4250: 'Baz' : inherits 'Boo::Boo::foo' via dominance [\_builds\ForTesting\example_inherits-via-dominance.vcxproj] 48 | ..\..\Source\examples\is-defined-to-be.cpp(11): warning C4574: 'FOO' is defined to be '0': did you mean to use '#if FOO'? [\_builds\ForTesting\example_is-defined-to-be.vcxproj] 49 | ..\..\Source\examples\layout-changed.cpp(13): warning C4371: 'Boo' : layout of class may have changed from a previous version of the compiler due to better packing of member 'Boo::mem' [\_builds\ForTesting\example_layout-changed.vcxproj] 50 | ..\..\Source\examples\.cpp(11): warning C4619: #pragma warning : there is no warning number '4675' [\_builds\ForTesting\example_.vcxproj] 51 | ..\..\Source\examples\non-virtual-dtor.cpp(11): warning C4265: 'Foo' : class has virtual functions, but destructor is not virtual [\_builds\ForTesting\example_non-virtual-dtor.vcxproj] 52 | ..\..\Source\examples\object-layout-change.cpp(13): warning C4435: 'B' : Object layout under /vd2 will change due to virtual base 'A' [\_builds\ForTesting\example_object-layout-change.vcxproj] 53 | ..\..\Source\examples\padded.cpp(10): warning C4820: 'Foo' : '3' bytes padding added after data member 'Foo::x' [\_builds\ForTesting\example_padded.vcxproj] 54 | ..\..\Source\examples\sign-compare.cpp(11): warning C4389: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_sign-compare.vcxproj] 55 | ..\..\Source\examples\sign-conversion.cpp(12): warning C4365: 'return' : conversion from 'unsigned int' to 'int', signed/unsigned mismatch [\_builds\ForTesting\example_sign-conversion.vcxproj] 56 | ..\..\Source\examples\signed-unsigned-compare.cpp(15): warning C4388: '==' : signed/unsigned mismatch [\_builds\ForTesting\example_signed-unsigned-compare.vcxproj] 57 | ..\..\Source\examples\static-ctor-not-thread-safe.cpp(15): warning C4640: 'foo' : construction of local static object is not thread-safe [\_builds\ForTesting\example_static-ctor-not-thread-safe.vcxproj] 58 | ..\..\Source\examples\switch-enum.cpp(21): warning C4061: enumerator 'B' in switch of enum 'Foo' is not explicitly handled by a case label [\_builds\ForTesting\example_switch-enum.vcxproj] 59 | ..\..\Source\examples\switch.cpp(19): warning C4062: enumerator 'B' in switch of enum 'X' is not handled [\_builds\ForTesting\example_switch.vcxproj] 60 | ..\..\Source\examples\this-used-in-init.cpp(18): warning C4355: 'this' : used in base member initializer list [\_builds\ForTesting\example_this-used-in-init.vcxproj] 61 | ..\..\Source\examples\undef.cpp(8): warning C4668: 'VERY_STRANGE_MACRO' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' [\_builds\ForTesting\example_undef.vcxproj] 62 | ..\..\Source\examples\unsafe-conversion.cpp(17): warning C4191: 'type cast' : unsafe conversion from 'void (__cdecl *)(int)' to 'func' [\_builds\ForTesting\example_unsafe-conversion.vcxproj] 63 | ..\..\Source\examples\unused-parameter.cpp(10): warning C4100: 'a' : unreferenced formal parameter [\_builds\ForTesting\example_unused-parameter.vcxproj] 64 | ..\..\Source\examples\unused-value.cpp(10): warning C4555: expression has no effect; expected expression with side-effect [\_builds\ForTesting\example_unused-value.vcxproj] 65 | ..\..\Source\examples\user-ctor-required.cpp(19): warning C4610: class 'Boo' can never be instantiated - user defined constructor required [\_builds\ForTesting\example_user-ctor-required.vcxproj] 66 | \source\examples\unreachable-code.cpp(11): warning C4702: unreachable code [\_builds\ForTesting\example_unreachable-code.vcxproj] 67 | -------------------------------------------------------------------------------- /expected-warnings/xcode.log: -------------------------------------------------------------------------------- 1 | /Source/examples/c++98-compat-pedantic.cpp:12:2: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-pedantic] 2 | /Source/examples/c++98-compat.cpp:8:3: warning: inline namespaces are incompatible with C++98 [-Wc++98-compat] 3 | /Source/examples/cast-aligned.cpp:11:13: warning: cast from 'char *' to 'long *' increases required alignment from 1 to 8 [-Wcast-align] 4 | /Source/examples/conditional-uninitialized.cpp:16:10: warning: variable 'result' may be uninitialized when used here [-Wconditional-uninitialized] 5 | /Source/examples/conversion-loss.cpp:19:7: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion] 6 | /Source/examples/conversion.cpp:18:5: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wconversion] 7 | /Source/examples/covered-switch-default.cpp:25:5: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] 8 | /Source/examples/covered-switch-default.cpp:26:7: warning: will never be executed [-Wunreachable-code] 9 | /Source/examples/deprecated-declarations.cpp:27:3: warning: 'foo' is deprecated: boo [-Wdeprecated-declarations] 10 | /Source/examples/deprecated-register.cpp:9:3: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register] 11 | /Source/examples/deprecated.cpp:9:14: warning: dynamic exception specifications are deprecated [-Wdeprecated] 12 | /Source/examples/documentation-unknown-command.cpp:8:5: warning: unknown command tag name [-Wdocumentation-unknown-command] 13 | /Source/examples/documentation.cpp:9:5: warning: unknown command tag name 'detail'; did you mean 'details'? [-Wdocumentation] 14 | /Source/examples/extra-semi.cpp:10:4: warning: extra ';' after member function definition [-Wextra-semi] 15 | /Source/examples/global-constructors.cpp:15:5: warning: declaration requires a global constructor [-Wglobal-constructors] 16 | /Source/examples/ill-formed-comma-expr.cpp:11:7: warning: expression result unused [-Wunused-value] 17 | /Source/examples/missing-noreturn.cpp:10:12: warning: function 'foo' could be declared with attribute 'noreturn' [-Wmissing-noreturn] 18 | /Source/examples/non-virtual-dtor.cpp:10:3: warning: 'Foo' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor] 19 | /Source/examples/padded.cpp:10:8: warning: padding struct 'Foo' with 7 bytes to align 'y' [-Wpadded] 20 | /Source/examples/shift-sign-overflow.cpp:9:32: warning: signed shift result (0x8000000000000000) sets the sign bit of the shift expression's type ('long') and becomes negative [-Wshift-sign-overflow] 21 | /Source/examples/sign-compare.cpp:11:9: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] 22 | /Source/examples/sign-conversion.cpp:12:10: warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion] 23 | /Source/examples/signed-unsigned-compare.cpp:15:9: warning: comparison of integers of different signs: 'int' and 'unsigned long long' [-Wsign-compare] 24 | /Source/examples/switch-enum.cpp:16:11: warning: enumeration value 'B' not explicitly handled in switch [-Wswitch-enum] 25 | /Source/examples/switch.cpp:16:11: warning: enumeration value 'B' not handled in switch [-Wswitch] 26 | /Source/examples/undef.cpp:8:6: warning: 'VERY_STRANGE_MACRO' is not defined, evaluates to 0 [-Wundef] 27 | /Source/examples/unreachable-code.cpp:11:10: warning: will never be executed [-Wunreachable-code] 28 | /Source/examples/unused-parameter.cpp:10:14: warning: unused parameter 'a' [-Wunused-parameter] 29 | /Source/examples/unused-value.cpp:10:3: warning: expression result unused [-Wunused-value] 30 | /Source/examples/used-but-marked-unused.cpp:20:3: warning: 'Foo' was marked unused but was used [-Wused-but-marked-unused] 31 | /Source/examples/weak-vtables.cpp:8:7: warning: 'Foo' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables] 32 | -------------------------------------------------------------------------------- /run-test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2014, Ruslan Baratov 4 | # All rights reserved. 5 | 6 | import argparse 7 | import os 8 | import re 9 | import shutil 10 | import subprocess 11 | import sys 12 | 13 | parser = argparse.ArgumentParser(description="Script for library testing") 14 | parser.add_argument( 15 | '--toolchain', 16 | choices=[ 17 | 'libcxx', 18 | 'xcode', 19 | 'clang_libstdcxx', 20 | 'gcc', 21 | 'gcc48', 22 | 'vs2013x64', 23 | 'vs2013' 24 | ], 25 | help="CMake generator/toolchain", 26 | ) 27 | 28 | parser.add_argument( 29 | '--type', 30 | required=True, 31 | help="CMake build type", 32 | ) 33 | 34 | args = parser.parse_args() 35 | 36 | toolchain = '' 37 | generator = '' 38 | expected_log = '' 39 | if args.toolchain == 'libcxx': 40 | toolchain = 'libcxx' 41 | expected_log = 'libcxx.log' 42 | elif args.toolchain == 'xcode': 43 | toolchain = 'xcode' 44 | generator = '-GXcode' 45 | expected_log = 'xcode.log' 46 | elif args.toolchain == 'clang_libstdcxx': 47 | toolchain = 'clang_libstdcxx' 48 | expected_log = 'clang_libstdcxx.log' 49 | elif args.toolchain == 'gcc48': 50 | toolchain = 'gcc48' 51 | expected_log = 'gcc48.log' 52 | elif args.toolchain == 'gcc': 53 | toolchain = 'gcc' 54 | expected_log = 'gcc.log' 55 | elif args.toolchain == 'vs2013x64': 56 | generator = '-GVisual Studio 12 2013 Win64' 57 | if args.type == "Debug": 58 | expected_log = 'vs64-debug.log' 59 | else: 60 | expected_log = 'vs64-release.log' 61 | elif args.toolchain == 'vs2013': 62 | generator = '-GVisual Studio 12 2013' 63 | if args.type == "Debug": 64 | expected_log = 'vs32-debug.log' 65 | else: 66 | expected_log = 'vs32-release.log' 67 | else: 68 | assert(False) 69 | 70 | cdir = os.getcwd() 71 | 72 | expected_log = os.path.join(cdir, 'expected-warnings', expected_log) 73 | if not os.path.exists(expected_log): 74 | sys.exit('Path not found: {}'.format(expected_log)) 75 | 76 | def call(args): 77 | try: 78 | print('Execute command: [') 79 | for i in args: 80 | print(' `{}`'.format(i)) 81 | print(']') 82 | result = subprocess.check_output( 83 | args, 84 | stderr=subprocess.STDOUT, 85 | universal_newlines=True 86 | ) 87 | return result 88 | except subprocess.CalledProcessError as error: 89 | print(error) 90 | print(error.output) 91 | sys.exit(1) 92 | except FileNotFoundError as error: 93 | print(error) 94 | sys.exit(1) 95 | 96 | call(['cmake', '--version']) 97 | 98 | polly_root = os.getenv("POLLY_ROOT") 99 | if not polly_root: 100 | sys.exit("Environment variable `POLLY_ROOT` is empty") 101 | 102 | toolchain_option = '' 103 | if toolchain: 104 | toolchain_path = os.path.join(polly_root, "{}.cmake".format(toolchain)) 105 | toolchain_option = "-DCMAKE_TOOLCHAIN_FILE={}".format(toolchain_path) 106 | 107 | build_dir = os.path.join(cdir, '_builds', 'ForTesting') 108 | build_dir_option = "-B{}".format(build_dir) 109 | 110 | build_type_for_generate_step = "-DCMAKE_BUILD_TYPE={}".format(args.type) 111 | 112 | def remove_useless_info(line): 113 | line = line.replace("no-such-warning", "") 114 | line = line.replace("1 warning generated.", "") 115 | line = line.replace("2 warnings generated.", "") 116 | line = line.replace("For Visual Studio warning", "") # nice comment :) 117 | line = line.replace("to silence this warning", "") 118 | line = line.replace(cdir, "") 119 | line = line.replace(cdir.lower(), "") # strange MSVC feature 120 | return line 121 | 122 | # Expected no warnings 123 | 124 | shutil.rmtree(build_dir, ignore_errors=True) 125 | 126 | generate_command = [ 127 | 'cmake', 128 | '-H.', 129 | build_dir_option, 130 | '-DLEATHERS_BUILD_EXAMPLES=ON', 131 | '-DLEATHERS_EXAMPLES_SHOW_WARNINGS=OFF', 132 | '-DHUNTER_RUN_INSTALL=ON', 133 | build_type_for_generate_step 134 | ] 135 | 136 | if generator: 137 | generate_command.append(generator) 138 | 139 | if toolchain_option: 140 | generate_command.append(toolchain_option) 141 | 142 | build_command = [ 143 | 'cmake', 144 | '--build', 145 | build_dir, 146 | '--config', 147 | args.type 148 | ] 149 | 150 | call(generate_command) 151 | build_log = call(build_command) 152 | 153 | build_lines = build_log.split('\n') 154 | for line in build_lines: 155 | line = remove_useless_info(line) 156 | if line.find("warning") != -1: 157 | print("Build generates warning (line: `{}`)".format(line)) 158 | print("Full log:\n{}".format(build_log)) 159 | sys.exit(1) 160 | 161 | # Expected warning list 162 | 163 | shutil.rmtree(build_dir, ignore_errors=True) 164 | 165 | generate_command = [ 166 | 'cmake', 167 | '-H.', 168 | build_dir_option, 169 | '-DLEATHERS_BUILD_EXAMPLES=ON', 170 | '-DLEATHERS_EXAMPLES_SHOW_WARNINGS=ON', 171 | build_type_for_generate_step 172 | ] 173 | 174 | if generator: 175 | generate_command.append(generator) 176 | 177 | if toolchain_option: 178 | generate_command.append(toolchain_option) 179 | 180 | build_command = [ 181 | 'cmake', 182 | '--build', 183 | build_dir, 184 | '--config', 185 | args.type 186 | ] 187 | 188 | call(generate_command) 189 | build_log = call(build_command) 190 | 191 | expected_warnings = open(expected_log, "r").read() 192 | result_warnings = "" 193 | 194 | build_lines = build_log.split('\n') 195 | build_lines.sort() 196 | 197 | for line in build_lines: 198 | line = remove_useless_info(line) 199 | if line.find("warning") != -1: 200 | result_warnings += line 201 | result_warnings += '\n' 202 | 203 | if len(result_warnings) == 0: 204 | sys.exit("No warnings detected!") 205 | 206 | travis_env = os.getenv("TRAVIS") 207 | if travis_env: 208 | print("Travis detected, skip expected check") 209 | sys.exit(0) 210 | 211 | if expected_warnings != result_warnings: 212 | print("Expected:") 213 | print(expected_warnings) 214 | print("Result:") 215 | print(result_warnings) 216 | temp = '__temp-expected.log' 217 | open(temp, 'w').write(result_warnings) 218 | print('Files differ:\n {}\n {}'.format(expected_log, temp)) 219 | sys.exit(1) 220 | 221 | print("OK") 222 | --------------------------------------------------------------------------------