From 4828abdc1ae04c20c58e3f17f4836befcb8ee096 Mon Sep 17 00:00:00 2001 From: Ash Logan Date: Tue, 23 Apr 2019 20:37:47 +1000 Subject: [PATCH] wut.cmake: Deprecate old wut_enable_* macros --- share/wut.cmake | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/share/wut.cmake b/share/wut.cmake index 1b20f9df..96438002 100644 --- a/share/wut.cmake +++ b/share/wut.cmake @@ -2,49 +2,22 @@ cmake_minimum_required(VERSION 3.2) # Links against wutnewlib macro(wut_enable_newlib target) - get_property(ENABLED_NEWLIB TARGET ${target} PROPERTY WUT_ENABLE_NEWLIB) - if(NOT DEFINED ENABLED_NEWLIB) - target_link_libraries(${target} - -Wl,--whole-archive wutnewlib -Wl,--no-whole-archive) - - set_target_properties(${target} PROPERTIES WUT_ENABLE_NEWLIB 1) - endif() + message(DEPRECATION "wut_enable_newlib is deprecated and has no effect - it is always enabled; and the macro will be removed in a future release. Please remove it from your CMakeLists.") endmacro() # Links against stdc++ wutstdc++ and set -std=c++17 macro(wut_enable_stdcpp target) - get_property(ENABLED_STDCPP TARGET ${target} PROPERTY WUT_ENABLE_STDCPP) - if(NOT DEFINED ENABLED_STDCPP) - wut_enable_newlib(${target}) - - target_link_libraries(${target} - stdc++ - -Wl,--whole-archive wutstdc++ -Wl,--no-whole-archive) - - set_target_properties(${target} PROPERTIES WUT_ENABLE_STDCPP 1) - endif() + message(DEPRECATION "wut_enable_stdcpp is deprecated and has no effect - it is always enabled when using C++; and the macro will be removed in a future release. Please remove it from your CMakeLists.") endmacro() # Links against devoptab macro(wut_enable_devoptab target) - get_property(ENABLED_DEVOPTAB TARGET ${target} PROPERTY WUT_ENABLE_DEVOPTAB) - if(NOT DEFINED ENABLED_DEVOPTAB) - target_link_libraries(${target} - -Wl,--whole-archive wutdevoptab -Wl,--no-whole-archive) - - set_target_properties(${target} PROPERTIES WUT_ENABLE_DEVOPTAB 1) - endif() + message(DEPRECATION "wut_enable_devoptab is deprecated and has no effect - it is always enabled; and the macro will be removed in a future release. Please remove it from your CMakeLists.") endmacro() # Links against wutmalloc macro(wut_default_malloc target) - get_property(ENABLED_DEFAULT_MALLOC TARGET ${target} PROPERTY WUT_DEFAULT_MALLOC) - if(NOT DEFINED ENABLED_DEFAULT_MALLOC) - target_link_libraries(${target} - -Wl,--whole-archive wutmalloc -Wl,--no-whole-archive) - - set_target_properties(${target} PROPERTIES WUT_DEFAULT_MALLOC 1) - endif() + message(DEPRECATION "wut_default_malloc is deprecated and has no effect - it is always enabled; and the macro will be removed in a future release. Please remove it from your CMakeLists.") endmacro() # Generates ${target}_exports.s from an exports file and adds it to the build