Skip to content

Commit

Permalink
Add option allowing to disable deprecation warning
Browse files Browse the repository at this point in the history
- disable those warnings for CircleCI and AppVeyor
  • Loading branch information
hkaiser committed Aug 9, 2017
1 parent f315058 commit 973cfaa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Expand Up @@ -140,6 +140,13 @@ endif()
# Set our build options cache variables which are customizable by users
#

hpx_option(HPX_WITH_DEPRECATION_WARNINGS
BOOL "Enable warnings for deprecated facilities. (default: ON)"
ON ADVANCED)
if(HPX_WITH_DEPRECATION_WARNINGS)
hpx_add_config_define(HPX_HAVE_DEPRECATION_WARNINGS)
endif()

## Generic build options
set(DEFAULT_MALLOC "system")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -25,7 +25,7 @@ install:
- cmd: 7z x "C:\projects\vcpkg-export-hpx-dependencies.7z" -y -oC:\projects\vcpkg >NUL

before_build:
- cmd: cmake -H. -Bbuild -A%PLATFORM% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_TOOLCHAIN_FILE=C:/projects/vcpkg/scripts/buildsystems/vcpkg.cmake -DHPX_WITH_GIT_COMMIT=%APPVEYOR_REPO_COMMIT% -DHPX_WITH_PSEUDO_DEPENDENCIES=On -DHPX_WITH_EXAMPLES=On -DHPX_WITH_EXAMPLES_HDF5=On -DHPX_WITH_TESTS=Off -DHPX_WITH_RUNTIME=Off
- cmd: cmake -H. -Bbuild -A%PLATFORM% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_TOOLCHAIN_FILE=C:/projects/vcpkg/scripts/buildsystems/vcpkg.cmake -DHPX_WITH_GIT_COMMIT=%APPVEYOR_REPO_COMMIT% -DHPX_WITH_PSEUDO_DEPENDENCIES=On -DHPX_WITH_EXAMPLES=On -DHPX_WITH_EXAMPLES_HDF5=On -DHPX_WITH_TESTS=Off -DHPX_WITH_RUNTIME=Off -DHPX_WITH_DEPRECATION_WARNINGS=Off

build_script:
- cmd: cmake --build build --config %CONFIGURATION% --target core -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /verbosity:minimal /maxcpucount:2 /nologo
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Expand Up @@ -20,7 +20,7 @@ dependencies:
- docker pull ${IMAGE_NAME}
- mkdir build
override:
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} cmake .. -DCMAKE_BUILD_TYPE=Debug -DHPX_WITH_MALLOC=system -DHPX_WITH_GIT_COMMIT=${CIRCLE_SHA1} -DHPX_WITH_TOOLS=On -DCMAKE_CXX_FLAGS="-fcolor-diagnostics" -DHPX_WITH_TESTS_HEADERS=On -DCMAKE_EXPORT_COMPILE_COMMANDS=On
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} cmake .. -DCMAKE_BUILD_TYPE=Debug -DHPX_WITH_MALLOC=system -DHPX_WITH_GIT_COMMIT=${CIRCLE_SHA1} -DHPX_WITH_TOOLS=On -DCMAKE_CXX_FLAGS="-fcolor-diagnostics" -DHPX_WITH_TESTS_HEADERS=On -DHPX_WITH_DEPRECATION_WARNINGS=Off -DCMAKE_EXPORT_COMPILE_COMMANDS=On
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} ../tools/clang-tidy.sh -diff-master
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 core
- docker run -v $PWD:/hpx -w /hpx/build ${IMAGE_NAME} make -j2 -k components
Expand Down
11 changes: 6 additions & 5 deletions hpx/config/attributes.hpp
Expand Up @@ -16,19 +16,20 @@
#endif

// handle [[deprecated]]
#if !defined(HPX_NO_DEPRECATED)
#if defined(HPX_HAVE_DEPRECATION_WARNINGS)
# define HPX_DEPRECATED_MSG \
"This function is deprecated and will be removed in the future."
"This functionality is deprecated and will be removed in the future."
# if defined(HPX_HAVE_CXX14_DEPRECATED_ATTRIBUTE)
# define HPX_DEPRECATED(x) [[deprecated(x)]]
# elif defined(HPX_MSVC)
# define HPX_DEPRECATED(x) __declspec(deprecated(x))
# elif defined(__GNUC__)
# define HPX_DEPRECATED(x) __attribute__((__deprecated__(x)))
# endif
# if !defined(HPX_DEPRECATED)
# define HPX_DEPRECATED(x) /**/
# endif
#endif

#if !defined(HPX_DEPRECATED)
# define HPX_DEPRECATED(x) /**/
#endif

#endif

0 comments on commit 973cfaa

Please sign in to comment.