Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated CMake functions #252

Merged
merged 2 commits into from
May 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions cmake/IgnUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -795,22 +795,6 @@ macro(ign_build_warning)
endforeach(str ${ARGN})
endmacro(ign_build_warning)

#################################################
macro(ign_add_library lib_target_name)

message(FATAL_ERROR
"ign_add_library(<target_name> <sources>) is deprecated. Instead, use "
"ign_create_core_library(SOURCES <sources>). It will determine the library "
"target name automatically from the project name. To add a component "
"library, use ign_add_component(~). Be sure to pass the CXX_STANDARD "
"argument to these functions in order to set the C++ standard that they "
"require.")


ign_create_core_library(SOURCES ${ARGN})

endmacro()

#################################################
# _ign_check_known_cxx_standards(<11|14|17>)
#
Expand Down Expand Up @@ -1500,15 +1484,6 @@ macro(ign_install_includes _subdir)
DESTINATION ${IGN_INCLUDE_INSTALL_DIR}/${_subdir} COMPONENT headers)
endmacro()

#################################################
macro(ign_install_library)

message(FATAL_ERROR
"ign_install_library is deprecated. "
"Please remove it from your cmake script!")

endmacro()

#################################################
macro(ign_install_executable _name )
set_target_properties(${_name} PROPERTIES VERSION ${PROJECT_VERSION_FULL})
Expand Down Expand Up @@ -1751,32 +1726,6 @@ macro(ign_build_tests)

endmacro()

#################################################
# ign_set_target_public_cxx_standard(<11|14|17>)
#
# NOTE: This was a temporary workaround for an earlier prerelease and is
# deprecated as of the "Components" pull request.
#
macro(ign_set_project_public_cxx_standard standard)

message(FATAL_ERROR
"The ign_set_project_public_cxx_standard(~) macro is deprecated. "
"Instead, use the CXX_STANDARD argument of ign_create_core_library(~).")

_ign_check_known_cxx_standards(${standard})

target_compile_features(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC ${IGN_CXX_${standard}_FEATURES})

# Note: We have to reconfigure the pkg-config information for the core library
# because this macro can only be called after ign_create_core_library(~). This
# is somewhat wasteful, so we should strongly prefer to use the CXX_STANDARD
# argument of ign_create_core_library(~).

ign_string_append(PROJECT_PKGCONFIG_CFLAGS "-std=c++${standard}")
_ign_create_pkgconfig()

endmacro()

#################################################
# _ign_cmake_parse_arguments(<prefix> <options> <oneValueArgs> <multiValueArgs> [ARGN])
#
Expand Down