diff --git a/CMakeLists.txt b/CMakeLists.txt index d7e45df4..3b719e32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,7 +204,7 @@ set(CPPCHECK_INCLUDE_DIRS ) set(IGNITION_CMAKE_CODECHECK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/codecheck") include(IgnCodeCheck) -ign_setup_target_for_codecheck() +_gz_setup_target_for_codecheck() # Docs set(IGNITION_CMAKE_DOXYGEN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen") diff --git a/cmake/FindIgnOGRE.cmake b/cmake/FindIgnOGRE.cmake index e00f6193..27841209 100644 --- a/cmake/FindIgnOGRE.cmake +++ b/cmake/FindIgnOGRE.cmake @@ -53,7 +53,8 @@ set(minor_version ${IgnOGRE_FIND_VERSION_MINOR}) set(full_version ${major_version}.${minor_version}) # Copied from OGREConfig.cmake -macro(ign_ogre_declare_plugin TYPE COMPONENT) +# Internal to gz-cmake. +macro(_gz_ogre_declare_plugin TYPE COMPONENT) set(OGRE_${TYPE}_${COMPONENT}_FOUND TRUE) set(OGRE_${TYPE}_${COMPONENT}_LIBRARIES ${TYPE}_${COMPONENT}) list(APPEND OGRE_LIBRARIES ${TYPE}_${COMPONENT}) @@ -183,7 +184,7 @@ else() string(SUBSTRING "${ogre_component}" "0" "${split_pos}" component_type) string(SUBSTRING "${ogre_component}" "${split_pos2}" "${len}" component_name) - ign_ogre_declare_plugin("${component_type}" "${component_name}") + _gz_ogre_declare_plugin("${component_type}" "${component_name}") endif() endforeach() diff --git a/cmake/IgnBenchmark.cmake b/cmake/IgnBenchmark.cmake index c79e34b3..db7e635c 100644 --- a/cmake/IgnBenchmark.cmake +++ b/cmake/IgnBenchmark.cmake @@ -2,9 +2,10 @@ # IgnBenchmark # ------------ # -# ign_add_version_info_target() +# _gz_add_version_info_target() # -# Adds a target to generate build and system configuration information. +# Adds a target to generate build and system configuration information. This +# function is private to gz-cmake. # # ign_add_benchmarks() # @@ -35,7 +36,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -function(ign_add_version_info_target) +function(_gz_add_version_info_target) # generate a version_info.json file that can be used to embed project # version information # While this command may look a bit unweildy, it creates a target @@ -83,7 +84,7 @@ function(ign_add_benchmarks) list(APPEND BENCHMARK_TARGETS_LIST "$") endforeach() - ign_add_version_info_target() + _gz_add_version_info_target() file(GENERATE OUTPUT diff --git a/cmake/IgnCodeCheck.cmake b/cmake/IgnCodeCheck.cmake index 95ef267f..9b839a16 100644 --- a/cmake/IgnCodeCheck.cmake +++ b/cmake/IgnCodeCheck.cmake @@ -1,15 +1,16 @@ # Setup the codecheck target, which will run cppcheck and cppplint. -function(ign_setup_target_for_codecheck) +# This function is private to gz-cmake. +function(_gz_setup_target_for_codecheck) include(IgnPython) find_program(CPPCHECK_PATH cppcheck) find_program(FIND_PATH find) - + if(NOT CPPCHECK_PATH) message(STATUS "The program [cppcheck] was not found! Skipping codecheck setup") return() endif() - + if(NOT FIND_PATH) message(STATUS "The program [find] was not found! Skipping codecheck setup.") return() diff --git a/cmake/IgnCodeCoverage.cmake b/cmake/IgnCodeCoverage.cmake index 5840c1bd..06cd2838 100644 --- a/cmake/IgnCodeCoverage.cmake +++ b/cmake/IgnCodeCoverage.cmake @@ -98,7 +98,7 @@ FUNCTION(ign_setup_target_for_coverage) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) set(_outputname ${gz_coverage_OUTPUT_NAME}) set(_targetname ${gz_coverage_TARGET_NAME}) diff --git a/cmake/IgnConfigureBuild.cmake b/cmake/IgnConfigureBuild.cmake index 27260424..a12f0103 100644 --- a/cmake/IgnConfigureBuild.cmake +++ b/cmake/IgnConfigureBuild.cmake @@ -39,7 +39,7 @@ macro(ign_configure_build) #============================================================================ # Examine the build type. If we do not recognize the type, we will generate # an error, so this must come before the error handling. - ign_parse_build_type() + _gz_parse_build_type() #============================================================================ # Ask whether we should make a shared or static library. @@ -85,12 +85,12 @@ macro(ign_configure_build) #-------------------------------------- # Set up the compiler flags - ign_set_compiler_flags() + _gz_set_compiler_flags() #-------------------------------------- # Set up the compiler feature flags to help us choose our standard - ign_set_cxx_feature_flags() + _gz_set_cxx_feature_flags() #-------------------------------------- @@ -121,7 +121,7 @@ macro(ign_configure_build) #-------------------------------------- # Create the "all" meta-target - ign_create_all_target() + _gz_create_all_target() #-------------------------------------- @@ -140,7 +140,7 @@ macro(ign_configure_build) else() add_subdirectory(src) - _ign_find_include_script() + _gz_find_include_script() endif() @@ -239,7 +239,7 @@ macro(ign_configure_build) set(found_${component}_src TRUE) endif() - _ign_find_include_script(COMPONENT ${component}) + _gz_find_include_script(COMPONENT ${component}) # Add the tests if(BUILD_TESTING AND @@ -271,12 +271,12 @@ macro(ign_configure_build) #-------------------------------------- # Export the "all" meta-target - ign_export_target_all() + _gz_export_target_all() #-------------------------------------- # Create codecheck target include(IgnCodeCheck) - ign_setup_target_for_codecheck() + _gz_setup_target_for_codecheck() #-------------------------------------- # If we made it this far, the configuration was successful @@ -286,7 +286,7 @@ macro(ign_configure_build) endmacro() -macro(ign_set_cxx_feature_flags) +macro(_gz_set_cxx_feature_flags) set(IGN_KNOWN_CXX_STANDARDS 11 14 17) @@ -296,7 +296,7 @@ macro(ign_set_cxx_feature_flags) endmacro() -function(_ign_find_include_script) +function(_gz_find_include_script) #------------------------------------ # Define the expected arguments @@ -336,7 +336,7 @@ function(_ign_find_include_script) endfunction() -macro(ign_parse_build_type) +macro(_gz_parse_build_type) #============================================================================ # If a build type is not specified, set it to RelWithDebInfo by default diff --git a/cmake/IgnConfigureProject.cmake b/cmake/IgnConfigureProject.cmake index 05b638f3..46434fe9 100644 --- a/cmake/IgnConfigureProject.cmake +++ b/cmake/IgnConfigureProject.cmake @@ -40,7 +40,7 @@ macro(ign_configure_project) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_configure_project "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_configure_project "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) # Note: The following are automatically defined by project(~) in cmake v3: # PROJECT_NAME @@ -124,7 +124,7 @@ macro(ign_configure_project) #============================================================================ # Create package information - ign_setup_packages() + _gz_setup_packages() #============================================================================ # Initialize build errors/warnings diff --git a/cmake/IgnCreateDocs.cmake b/cmake/IgnCreateDocs.cmake index a03e71a9..1870c841 100644 --- a/cmake/IgnCreateDocs.cmake +++ b/cmake/IgnCreateDocs.cmake @@ -56,7 +56,7 @@ function(ign_create_docs) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_create_docs "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_create_docs "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) set(required_html_files "doxygen/html/annotated.html" diff --git a/cmake/IgnGenerateVersionInfo.cmake b/cmake/IgnGenerateVersionInfo.cmake index 09ff1137..2047da59 100644 --- a/cmake/IgnGenerateVersionInfo.cmake +++ b/cmake/IgnGenerateVersionInfo.cmake @@ -2,7 +2,7 @@ # IgnGenerateVersionInfo # ---------------------- # -# Intended to be invoked as part of the ign_add_version_info_target function +# Intended to be invoked as part of the _gz_add_version_info_target function # in IgnBenchmark. # # Populates information in the version_info.json file. diff --git a/cmake/IgnImportTarget.cmake b/cmake/IgnImportTarget.cmake index 871bfb85..8a2abdb2 100644 --- a/cmake/IgnImportTarget.cmake +++ b/cmake/IgnImportTarget.cmake @@ -53,7 +53,7 @@ macro(ign_import_target package) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_import_target "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_import_target "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) #------------------------------------ # Check if a target name has been provided, otherwise use @@ -97,7 +97,7 @@ macro(ign_import_target package) if(NOT gz_import_target_INTERFACE) if(${gz_import_target_LIB_VAR}) - _ign_sort_libraries(${target_name} ${${gz_import_target_LIB_VAR}}) + _gz_sort_libraries(${target_name} ${${gz_import_target_LIB_VAR}}) endif() endif() @@ -148,7 +148,7 @@ endmacro() # # TODO: Figure out if there is a better way to fill in the various library # properties of an imported target. -function(_ign_sort_libraries target_name first_lib) +function(_gz_sort_libraries target_name first_lib) if(MSVC) # Note: For MSVC, we only care about the "import library" which is the diff --git a/cmake/IgnManualSearch.cmake b/cmake/IgnManualSearch.cmake index 8d1faa4c..787909a8 100644 --- a/cmake/IgnManualSearch.cmake +++ b/cmake/IgnManualSearch.cmake @@ -51,7 +51,7 @@ macro(ign_manual_search package) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_manual_search "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_manual_search "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(gz_manual_search_INTERFACE) set(_gz_manual_search_interface_option INTERFACE) @@ -93,7 +93,7 @@ macro(ign_manual_search package) if(${package}_FOUND) include(IgnImportTarget) - ign_import_target(${package} ${_ign_pkg_check_modules_interface_option} + ign_import_target(${package} ${_gz_pkg_check_modules_interface_option} TARGET_NAME ${ign_pkg_check_modules_TARGET_NAME}) endif() diff --git a/cmake/IgnPackaging.cmake b/cmake/IgnPackaging.cmake index 1c4a0a4a..865e655f 100644 --- a/cmake/IgnPackaging.cmake +++ b/cmake/IgnPackaging.cmake @@ -2,9 +2,10 @@ # IgnPackaging # ---------------- # -# ign_setup_packages +# _gz_setup_packages # # Sets up package information for an ignition library project. +# This function is internal to gz-cmake. # # ign_create_package # @@ -27,7 +28,7 @@ ################################################# # Set up package information -macro(ign_setup_packages) +macro(_gz_setup_packages) #============================================================================ # Use GNUInstallDirs to get canonical paths. @@ -150,7 +151,7 @@ macro(ign_create_packages) #============================================================================ # Load platform-specific build hooks if present. - ign_load_build_hooks() + _gz_load_build_hooks() #============================================================================ # Tell the user what their settings are @@ -161,7 +162,7 @@ endmacro() ################################################# -# _ign_create_pkgconfig([COMPONENT ]) +# _gz_create_pkgconfig([COMPONENT ]) # # Provide the name of the target for which we will generate package config info. # If the target is a component, pass in the COMPONENT argument followed by the @@ -175,7 +176,7 @@ endmacro() # ignition-component.pc.in MUST be set before calling this function. # # Create a pkgconfig file for your target, and install it. -function(_ign_create_pkgconfig) +function(_gz_create_pkgconfig) #------------------------------------ # Define the expected arguments @@ -216,7 +217,7 @@ endfunction() ################################################# -# _ign_create_cmake_package([COMPONENT ] +# _gz_create_cmake_package([COMPONENT ] # [LEGACY_PROJECT_PREFIX ]) # # Provide the name of the target that will be installed and exported. If the @@ -239,7 +240,7 @@ endfunction() # - target_output_filename # # Make the cmake config files for this target -function(_ign_create_cmake_package) +function(_gz_create_cmake_package) #------------------------------------ # Define the expected arguments @@ -364,7 +365,9 @@ endfunction() # Pass an argument to specify the directory where the CMakeLists.txt for the # build hooks is located. If no argument is provided, we default to: # ${PROJECT_SOURCE_DIR}/packager-hooks -function(ign_load_build_hooks) +# +# This function is private to gz-cmake. +function(_gz_load_build_hooks) if(ARGV0) set(hook_dir ${ARGV0}) diff --git a/cmake/IgnPkgConfig.cmake b/cmake/IgnPkgConfig.cmake index 71f2e039..aba024b9 100644 --- a/cmake/IgnPkgConfig.cmake +++ b/cmake/IgnPkgConfig.cmake @@ -72,7 +72,7 @@ macro(ign_pkg_check_modules_quiet package signature) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_pkg_check_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_pkg_check_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(gz_pkg_check_modules_INTERFACE) set(_gz_pkg_check_modules_interface_option INTERFACE) @@ -154,7 +154,7 @@ macro(ign_pkg_check_modules_quiet package signature) # # TODO: How would we deal with multiple modules that are in different # directories? How does cmake-3.6+ handle that situation? - _ign_pkgconfig_find_libraries( + _gz_pkgconfig_find_libraries( ${package}_LIBRARIES ${package} "${${package}_LIBRARIES}" @@ -196,7 +196,7 @@ endmacro() # Based on discussion here: https://cmake.org/Bug/view.php?id=15804 # and a patch written by Sam Thursfield -function(_ign_pkgconfig_find_libraries output_var package library_names library_dirs) +function(_gz_pkgconfig_find_libraries output_var package library_names library_dirs) foreach(libname ${library_names}) diff --git a/cmake/IgnSetCompilerFlags.cmake b/cmake/IgnSetCompilerFlags.cmake index f63404fe..750d15dc 100644 --- a/cmake/IgnSetCompilerFlags.cmake +++ b/cmake/IgnSetCompilerFlags.cmake @@ -2,7 +2,7 @@ # IgnSetCompilerFlags # ------------------- # -# ign_set_compiler_flags() +# _gz_set_compiler_flags() # # Sets up compiler flags for an ignition library project # @@ -23,18 +23,19 @@ # ################################################# # Set up compiler flags -macro(ign_set_compiler_flags) +# Internal to gz-cmake. +macro(_gz_set_compiler_flags) option(USE_IGN_RECOMMENDED_FLAGS "Build project using the compiler flags recommended by the ignition developers" ON) if(MSVC) - ign_setup_msvc() + _gz_setup_msvc() elseif(UNIX) - ign_setup_unix() + _gz_setup_unix() endif() if(APPLE) - ign_setup_apple() + _gz_setup_apple() endif() # Check if we are compiling with Clang and cache it @@ -56,12 +57,12 @@ macro(ign_set_compiler_flags) if(GCC_OR_CLANG) if(USE_IGN_RECOMMENDED_FLAGS) - ign_setup_gcc_or_clang() + _gz_setup_gcc_or_clang() endif() option(USE_HOST_SSE_FLAGS "Explicitly use compiler flags to indicate the SSE version of the host machine" TRUE) if(USE_HOST_SSE_FLAGS) - ign_set_sse_flags() + _gz_set_sse_flags() endif() endif() @@ -70,7 +71,8 @@ endmacro() ################################################# # Configure settings for Unix -macro(ign_setup_unix) +# Internal to gz-cmake. +macro(_gz_setup_unix) find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) if(CMAKE_UNAME) @@ -85,7 +87,8 @@ macro(ign_setup_unix) endmacro() ################################################# -macro(ign_setup_apple) +# Internal to gz-cmake. +macro(_gz_setup_apple) # NOTE MacOSX provides different system versions than CMake is parsing. # The following table lists the most recent OSX versions @@ -113,7 +116,8 @@ endmacro() ################################################# # Set up compilation flags for GCC or Clang -macro(ign_setup_gcc_or_clang) +# Internal to gz-cmake. +macro(_gz_setup_gcc_or_clang) if(gz_configure_build_HIDE_SYMBOLS_BY_DEFAULT) set(CMAKE_C_VISIBILITY_PRESET "hidden") @@ -124,7 +128,7 @@ macro(ign_setup_gcc_or_clang) endif() - ign_filter_valid_compiler_options( + _gz_filter_valid_compiler_options( CUSTOM_ALL_FLAGS -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic @@ -172,7 +176,7 @@ macro(ign_setup_gcc_or_clang) # inline functions. # ...TODO: Is this redundant with -fno-inline? # -fno-implicit-inline-templates: TODO: Why do we use this? - ign_filter_valid_compiler_options( + _gz_filter_valid_compiler_options( CUSTOM_CXX_COVERAGE_FLAGS -fno-elide-constructors -fno-default-inline @@ -242,7 +246,8 @@ endmacro() ################################################# # Identify what type of Streaming SIMD Extension is being used by the system and # then set the compiler's SSE flags appropriately. -macro(ign_set_sse_flags) +# Internal to gz-cmake. +macro(_gz_set_sse_flags) message(STATUS "\n-- Searching for host SSE information") include(IgnCheckSSE) @@ -280,7 +285,8 @@ endmacro() ################################################# # Set up compilation flags for Microsoft Visual Studio/C++ -macro(ign_setup_msvc) +# Internal to gz-cmake. +macro(_gz_setup_msvc) # Reduce overhead by ignoring unnecessary Windows headers add_definitions(-DWIN32_LEAN_AND_MEAN) diff --git a/cmake/IgnUtils.cmake b/cmake/IgnUtils.cmake index 4f185061..22ac8b81 100644 --- a/cmake/IgnUtils.cmake +++ b/cmake/IgnUtils.cmake @@ -148,7 +148,7 @@ macro(ign_find_package PACKAGE_NAME) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_find_package "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_find_package "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) #------------------------------------ # Construct the arguments to pass to find_package @@ -209,7 +209,7 @@ macro(ign_find_package PACKAGE_NAME) set(${PACKAGE_NAME}_msg "Missing dependency [${${PACKAGE_NAME}_pretty}]") if(gz_find_package_COMPONENTS) - ign_list_to_string(comp_str gz_find_package_COMPONENTS DELIM ", ") + _gz_list_to_string(comp_str gz_find_package_COMPONENTS DELIM ", ") set(${PACKAGE_NAME}_msg "${${PACKAGE_NAME}_msg} (Components: ${comp_str})") endif() @@ -478,7 +478,7 @@ macro(ign_string_append output_var val) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_string_append "PARENT_SCOPE;${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_string_append "PARENT_SCOPE;${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(gz_string_append_DELIM) set(delim "${gz_string_append_DELIM}") @@ -503,7 +503,8 @@ endmacro() ################################################# # Macro to turn a list into a string -macro(ign_list_to_string _output _input_list) +# Internal to gz-cmake. +macro(_gz_list_to_string _output _input_list) set(${_output}) foreach(_item ${${_input_list}}) @@ -633,7 +634,7 @@ function(ign_install_all_headers) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_install_all_headers "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_install_all_headers "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) #------------------------------------ @@ -812,14 +813,14 @@ macro(ign_add_library lib_target_name) endmacro() ################################################# -# _ign_check_known_cxx_standards(<11|14|17>) +# _gz_check_known_cxx_standards(<11|14|17>) # # Creates a fatal error if the variable passed in does not represent a supported # version of the C++ standard. # # NOTE: This function is meant for internal ign-cmake use # -function(_ign_check_known_cxx_standards standard) +function(_gz_check_known_cxx_standards standard) list(FIND IGN_KNOWN_CXX_STANDARDS ${standard} known) if(${known} EQUAL -1) @@ -831,7 +832,7 @@ function(_ign_check_known_cxx_standards standard) endfunction() ################################################# -# _ign_handle_cxx_standard( +# _gz_handle_cxx_standard( # # ) # @@ -840,18 +841,18 @@ endfunction() # # NOTE: This is only meant for internal ign-cmake use. # -macro(_ign_handle_cxx_standard prefix target pkgconfig_cflags) +macro(_gz_handle_cxx_standard prefix target pkgconfig_cflags) if(${prefix}_CXX_STANDARD) - _ign_check_known_cxx_standards(${${prefix}_CXX_STANDARD}) + _gz_check_known_cxx_standards(${${prefix}_CXX_STANDARD}) endif() if(${prefix}_PRIVATE_CXX_STANDARD) - _ign_check_known_cxx_standards(${${prefix}_PRIVATE_CXX_STANDARD}) + _gz_check_known_cxx_standards(${${prefix}_PRIVATE_CXX_STANDARD}) endif() if(${prefix}_INTERFACE_CXX_STANDARD) - _ign_check_known_cxx_standards(${${prefix}_INTERFACE_CXX_STANDARD}) + _gz_check_known_cxx_standards(${${prefix}_INTERFACE_CXX_STANDARD}) endif() if(${prefix}_CXX_STANDARD @@ -952,7 +953,7 @@ function(ign_create_core_library) #------------------------------------ # Create the target for the core library, and configure it to be installed - _ign_add_library_or_component( + _gz_add_library_or_component( LIB_NAME ${PROJECT_LIBRARY_TARGET_NAME} INCLUDE_DIR "${PROJECT_INCLUDE_DIR}" EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER} @@ -997,7 +998,7 @@ function(ign_create_core_library) #------------------------------------ # Adjust variables if a specific C++ standard was requested - _ign_handle_cxx_standard(gz_create_core_library + _gz_handle_cxx_standard(gz_create_core_library ${PROJECT_LIBRARY_TARGET_NAME} PROJECT_PKGCONFIG_CFLAGS) @@ -1010,10 +1011,10 @@ function(ign_create_core_library) endif() # Export and install the core library's cmake target and package information - _ign_create_cmake_package(LEGACY_PROJECT_PREFIX ${gz_create_core_library_LEGACY_PROJECT_PREFIX}) + _gz_create_cmake_package(LEGACY_PROJECT_PREFIX ${gz_create_core_library_LEGACY_PROJECT_PREFIX}) # Generate and install the core library's pkgconfig information - _ign_create_pkgconfig() + _gz_create_pkgconfig() #------------------------------------ @@ -1136,7 +1137,7 @@ function(ign_add_component component_name) #------------------------------------ # Create the target for this component, and configure it to be installed - _ign_add_library_or_component( + _gz_add_library_or_component( LIB_NAME ${component_target_name} INCLUDE_DIR "${PROJECT_INCLUDE_DIR}/${include_subdir}" EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER}_${component_name_upper} @@ -1185,7 +1186,7 @@ function(ign_add_component component_name) #------------------------------------ # Adjust variables if a specific C++ standard was requested - _ign_handle_cxx_standard(ign_add_component + _gz_handle_cxx_standard(ign_add_component ${component_target_name} ${component_name}_PKGCONFIG_CFLAGS) @@ -1260,10 +1261,10 @@ function(ign_add_component component_name) set(component_pkgconfig_cflags ${${component_name}_PKGCONFIG_CFLAGS}) # Export and install the cmake target and package information - _ign_create_cmake_package(COMPONENT ${component_name}) + _gz_create_cmake_package(COMPONENT ${component_name}) # Generate and install the pkgconfig information for this component - _ign_create_pkgconfig(COMPONENT ${component_name}) + _gz_create_pkgconfig(COMPONENT ${component_name}) #------------------------------------ @@ -1281,7 +1282,8 @@ function(ign_add_component component_name) endfunction() ################################################# -function(ign_create_all_target) +# Creates the `all` target. This function is private to gz-cmake. +function(_gz_create_all_target) add_library(${PROJECT_LIBRARY_TARGET_NAME}-all INTERFACE) @@ -1296,7 +1298,8 @@ function(ign_create_all_target) endfunction() ################################################# -function(ign_export_target_all) +# Exports the `all` target. This function is private to gz-cmake. +function(_gz_export_target_all) # find_all_pkg_components is used as a variable in ignition-all-config.cmake.in set(find_all_pkg_components "") @@ -1309,16 +1312,16 @@ function(ign_export_target_all) endforeach() endif() - _ign_create_cmake_package(ALL) + _gz_create_cmake_package(ALL) endfunction() ################################################# -# Used internally by _ign_add_library_or_component to report argument errors -macro(_ign_add_library_or_component_arg_error missing_arg) +# Used internally by _gz_add_library_or_component to report argument errors +macro(_gz_add_library_or_component_arg_error missing_arg) message(FATAL_ERROR "ignition-cmake developer error: Must specify " - "${missing_arg} to _ign_add_library_or_component!") + "${missing_arg} to _gz_add_library_or_component!") endmacro() @@ -1327,12 +1330,12 @@ endmacro() # of ignition-cmake, please use ign_create_core_library(~) or # ign_add_component(~) instead of this. # -# _ign_add_library_or_component(LIB_NAME +# _gz_add_library_or_component(LIB_NAME # INCLUDE_DIR # EXPORT_BASE # SOURCES ) # -macro(_ign_add_library_or_component) +macro(_gz_add_library_or_component) # NOTE: The following local variables are used in the Export.hh.in file, so if # you change their names here, you must also change their names there: @@ -1519,7 +1522,8 @@ endmacro() ################################################# # Macro to setup supported compiler warnings # Based on work of Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST. -macro(ign_filter_valid_compiler_options var) +# Internal to gz-cmake +macro(_gz_filter_valid_compiler_options var) include(CheckCXXCompilerFlag) # Store the current setting for CMAKE_REQUIRED_QUIET @@ -1586,7 +1590,7 @@ macro(ign_build_executables) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_build_executables "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_build_executables "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) foreach(exec_file ${gz_build_executables_SOURCES}) @@ -1658,7 +1662,7 @@ macro(ign_build_tests) #------------------------------------ # Parse the arguments - _ign_cmake_parse_arguments(gz_build_tests "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + _gz_cmake_parse_arguments(gz_build_tests "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT gz_build_tests_TYPE) # If you have encountered this error, you are probably migrating to the @@ -1763,7 +1767,7 @@ macro(ign_set_project_public_cxx_standard standard) "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}) + _gz_check_known_cxx_standards(${standard}) target_compile_features(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC ${IGN_CXX_${standard}_FEATURES}) @@ -1773,12 +1777,12 @@ macro(ign_set_project_public_cxx_standard standard) # argument of ign_create_core_library(~). ign_string_append(PROJECT_PKGCONFIG_CFLAGS "-std=c++${standard}") - _ign_create_pkgconfig() + _gz_create_pkgconfig() endmacro() ################################################# -# _ign_cmake_parse_arguments( [ARGN]) +# _gz_cmake_parse_arguments( [ARGN]) # # Set to match the prefix that is given to cmake_parse_arguments(~). # This should also match the name of the function or macro that called it. @@ -1786,7 +1790,7 @@ endmacro() # NOTE: This should only be used by functions inside of ign-cmake specifically. # Other ignition projects should not use this macro. # -macro(_ign_cmake_parse_arguments prefix options oneValueArgs multiValueArgs) +macro(_gz_cmake_parse_arguments prefix options oneValueArgs multiValueArgs) cmake_parse_arguments(${prefix} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})