diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fe82483..e8cce1b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) if(MSVC) add_definitions("/W4") else() - add_definitions(-Wall -Wextra -pedantic -Wno-deprecated-declarations) + add_definitions(-Wall -Wextra -pedantic) endif() if(CMAKE_VERSION VERSION_GREATER 3.6) diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index d81ccfd6..58ab5fd3 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -1039,6 +1039,18 @@ class App { return formatter_->make_help(this, prev, mode); } + /// Provided for backwards compatibility \deprecated + CLI11_DEPRECATED("Please use footer instead") + App *set_footer(std::string msg) { return footer(msg); } + + /// Provided for backwards compatibility \deprecated + CLI11_DEPRECATED("Please use name instead") + App *set_name(std::string msg) { return name(msg); } + + /// Provided for backwards compatibility \deprecated + CLI11_DEPRECATED("Please use callback instead") + App *set_callback(std::function fn) { return callback(fn); } + ///@} /// @name Getters ///@{ diff --git a/include/CLI/Macros.hpp b/include/CLI/Macros.hpp index 6defe59a..f7a26650 100644 --- a/include/CLI/Macros.hpp +++ b/include/CLI/Macros.hpp @@ -30,7 +30,7 @@ #endif #endif -#if defined(PYBIND11_CPP14) +#if defined(CLI11_CPP14) #define CLI11_DEPRECATED(reason) [[deprecated(reason)]] #elif defined(_MSC_VER) #define CLI11_DEPRECATED(reason) __declspec(deprecated(reason)) diff --git a/include/CLI/Option.hpp b/include/CLI/Option.hpp index d0335ff9..3bb24340 100644 --- a/include/CLI/Option.hpp +++ b/include/CLI/Option.hpp @@ -665,6 +665,10 @@ class Option : public OptionBase