From 5f98f61eb9a999842014df425c8fe826473c1603 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Mon, 25 Nov 2024 20:21:57 +0100 Subject: [PATCH] Reduce example names to be able to run Conda CI on Windows (gz-cmake2) (#463) * Finish with the massive renaming --------- Signed-off-by: Jose Luis Rivero --- examples/CMakeLists.txt | 107 ++++++++++-------- .../{core_child => c_child}/CMakeLists.txt | 4 +- examples/{core_child => c_child}/README.md | 0 .../include/CMakeLists.txt | 0 .../src/CMakeLists.txt | 2 +- examples/{core_child => c_child}/src/empty.cc | 0 .../test/CMakeLists.txt | 0 .../CMakeLists.txt | 4 +- .../README.md | 0 .../include/CMakeLists.txt | 0 .../src/CMakeLists.txt | 2 +- .../src/empty.cc | 0 .../test/CMakeLists.txt | 0 .../{core_nodep => c_nodep}/CMakeLists.txt | 2 +- examples/{core_nodep => c_nodep}/README.md | 0 .../include/CMakeLists.txt | 0 .../src/AlmostEmpty.cc | 6 +- .../src/CMakeLists.txt | 0 .../test/CMakeLists.txt | 0 .../CMakeLists.txt | 2 +- .../README.md | 0 .../include/CMakeLists.txt | 0 .../src/AlmostEmpty.cc | 6 +- .../src/CMakeLists.txt | 0 .../test/CMakeLists.txt | 0 .../CMakeLists.txt | 4 +- .../README.md | 4 +- .../include/CMakeLists.txt | 0 .../src/CMakeLists.txt | 2 +- .../src/empty.cc | 0 .../test/CMakeLists.txt | 0 examples/comp_deps/CMakeLists.txt | 2 +- examples/comp_deps/src/AlmostEmpty.cc | 6 +- .../CMakeLists.txt | 4 +- .../README.md | 0 .../src/CMakeLists.txt | 2 +- .../src/empty.cc | 0 .../CMakeLists.txt | 4 +- .../README.md | 2 +- .../src/CMakeLists.txt | 2 +- .../src/empty.cc | 0 examples/comp_depsC/CMakeLists.txt | 8 ++ .../README.md | 0 examples/comp_depsC/src/CMakeLists.txt | 6 + .../src/empty.cc | 0 .../CMakeLists.txt | 0 .../Findignition-find_config.cmake | 0 .../{use_config_ifp => config_ifp}/README.md | 0 .../ignition-find_configConfig.cmake | 0 .../test => config_ifp/src}/CMakeLists.txt | 0 examples/core_static_child/src/CMakeLists.txt | 6 - .../CMakeLists.txt | 2 +- .../README.md | 0 .../include/CMakeLists.txt | 0 .../include/no_ign/CMakeLists.txt | 0 .../include/no_ign/config.hh.in | 0 .../src/AlmostEmpty.cc | 4 +- .../src/CMakeLists.txt | 0 .../src => no_ign_prefix/test}/CMakeLists.txt | 0 examples/test_c_child_requires_c_no_deps.bash | 54 +++++++++ ...test_core_child_requires_core_no_deps.bash | 54 --------- examples/use_component_depsA/CMakeLists.txt | 8 -- 62 files changed, 163 insertions(+), 146 deletions(-) rename examples/{core_child => c_child}/CMakeLists.txt (75%) rename examples/{core_child => c_child}/README.md (100%) rename examples/{core_child => c_child}/include/CMakeLists.txt (100%) rename examples/{core_child => c_child}/src/CMakeLists.txt (82%) rename examples/{core_child => c_child}/src/empty.cc (100%) rename examples/{core_child => c_child}/test/CMakeLists.txt (100%) rename examples/{core_child_private => c_child_private}/CMakeLists.txt (72%) rename examples/{core_child_private => c_child_private}/README.md (100%) rename examples/{core_child_private => c_child_private}/include/CMakeLists.txt (100%) rename examples/{core_child_private => c_child_private}/src/CMakeLists.txt (82%) rename examples/{core_child_private => c_child_private}/src/empty.cc (100%) rename examples/{core_child_private => c_child_private}/test/CMakeLists.txt (100%) rename examples/{core_nodep => c_nodep}/CMakeLists.txt (81%) rename examples/{core_nodep => c_nodep}/README.md (100%) rename examples/{core_nodep => c_nodep}/include/CMakeLists.txt (100%) rename examples/{core_nodep => c_nodep}/src/AlmostEmpty.cc (84%) rename examples/{core_nodep => c_nodep}/src/CMakeLists.txt (100%) rename examples/{core_nodep => c_nodep}/test/CMakeLists.txt (100%) rename examples/{core_nodep_static => c_nodep_static}/CMakeLists.txt (81%) rename examples/{core_nodep_static => c_nodep_static}/README.md (100%) rename examples/{core_nodep_static => c_nodep_static}/include/CMakeLists.txt (100%) rename examples/{core_nodep_static => c_nodep_static}/src/AlmostEmpty.cc (83%) rename examples/{core_nodep_static => c_nodep_static}/src/CMakeLists.txt (100%) rename examples/{core_nodep_static => c_nodep_static}/test/CMakeLists.txt (100%) rename examples/{core_static_child => c_static_child}/CMakeLists.txt (73%) rename examples/{core_static_child => c_static_child}/README.md (62%) rename examples/{core_static_child => c_static_child}/include/CMakeLists.txt (100%) rename examples/{use_component_depsC => c_static_child}/src/CMakeLists.txt (79%) rename examples/{core_static_child => c_static_child}/src/empty.cc (100%) rename examples/{core_static_child => c_static_child}/test/CMakeLists.txt (100%) rename examples/{use_component_depsC => comp_depsA}/CMakeLists.txt (62%) rename examples/{use_component_depsA => comp_depsA}/README.md (100%) rename examples/{use_component_depsB => comp_depsA}/src/CMakeLists.txt (79%) rename examples/{use_component_depsA => comp_depsA}/src/empty.cc (100%) rename examples/{use_component_depsB => comp_depsB}/CMakeLists.txt (60%) rename examples/{use_component_depsB => comp_depsB}/README.md (82%) rename examples/{use_component_depsA => comp_depsB}/src/CMakeLists.txt (79%) rename examples/{use_component_depsB => comp_depsB}/src/empty.cc (100%) create mode 100644 examples/comp_depsC/CMakeLists.txt rename examples/{use_component_depsC => comp_depsC}/README.md (100%) create mode 100644 examples/comp_depsC/src/CMakeLists.txt rename examples/{use_component_depsC => comp_depsC}/src/empty.cc (100%) rename examples/{use_config_ifp => config_ifp}/CMakeLists.txt (100%) rename examples/{use_config_ifp => config_ifp}/Findignition-find_config.cmake (100%) rename examples/{use_config_ifp => config_ifp}/README.md (100%) rename examples/{use_config_ifp => config_ifp}/ignition-find_configConfig.cmake (100%) rename examples/{no_ignition_prefix/test => config_ifp/src}/CMakeLists.txt (100%) delete mode 100644 examples/core_static_child/src/CMakeLists.txt rename examples/{no_ignition_prefix => no_ign_prefix}/CMakeLists.txt (85%) rename examples/{no_ignition_prefix => no_ign_prefix}/README.md (100%) rename examples/{no_ignition_prefix => no_ign_prefix}/include/CMakeLists.txt (100%) rename examples/{no_ignition_prefix => no_ign_prefix}/include/no_ign/CMakeLists.txt (100%) rename examples/{no_ignition_prefix => no_ign_prefix}/include/no_ign/config.hh.in (100%) rename examples/{no_ignition_prefix => no_ign_prefix}/src/AlmostEmpty.cc (89%) rename examples/{no_ignition_prefix => no_ign_prefix}/src/CMakeLists.txt (100%) rename examples/{use_config_ifp/src => no_ign_prefix/test}/CMakeLists.txt (100%) create mode 100755 examples/test_c_child_requires_c_no_deps.bash delete mode 100755 examples/test_core_child_requires_core_no_deps.bash delete mode 100644 examples/use_component_depsA/CMakeLists.txt diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 90abd1ac..8f47d159 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -3,6 +3,21 @@ include(GNUInstallDirs) # test multiple build types set(build_types Release RelWithDebInfo Debug) +function(short_build_type build_type output_var) + if (${build_type} STREQUAL "Release") + set(bt_str "R") + elseif (${build_type} STREQUAL "RelWithDebInfo") + set(bt_str "RWD") + elseif (${build_type} STREQUAL "Debug") + set(bt_str "D") + elseif (${build_type} STREQUAL "Coverage") + set(bt_str "C") + else() + message(FATAL_ERROR "Unknown build_type ${build_type}") + endif() + set (${output_var} ${bt_str} PARENT_SCOPE) +endfunction() + find_program(EXAMPLE_LCOV_PATH lcov) if (NOT WIN32 AND EXAMPLE_LCOV_PATH) list(APPEND build_types Coverage) @@ -10,21 +25,21 @@ endif() set(example_directories ign_conf - no_ignition_prefix + no_ign_prefix prerelease - core_nodep - core_nodep_static - core_child - core_child_private - core_static_child + c_nodep + c_nodep_static + c_child + c_child_private + c_static_child comp_deps - use_config_ifp + config_ifp ) if (NOT CMAKE_GENERATOR MATCHES "Visual Studio") list(APPEND example_directories - use_component_depsA - use_component_depsB - use_component_depsC + comp_depsA + comp_depsB + comp_depsC ) endif() @@ -32,34 +47,34 @@ foreach(example ${example_directories}) set(run_codecheck false) if (${example} STREQUAL "ign_conf") set(example_tarball_name ignition-minimal-0.1.0.tar.bz2) - elseif (${example} STREQUAL "no_ignition_prefix") - set(example_tarball_name no_ignition_prefix-0.1.0.tar.bz2) + elseif (${example} STREQUAL "no_ign_prefix") + set(example_tarball_name no_ign_prefix-0.1.0.tar.bz2) elseif (${example} STREQUAL "prerelease") set(example_tarball_name ignition-minimal-1.0.0~pre1.tar.bz2) - elseif (${example} STREQUAL "core_nodep") - set(example_tarball_name ignition-core_no_deps-0.1.0.tar.bz2) + elseif (${example} STREQUAL "c_nodep") + set(example_tarball_name ignition-c_no_deps-0.1.0.tar.bz2) set(run_codecheck true) - elseif (${example} STREQUAL "core_nodep_static") - set(example_tarball_name ignition-core_no_deps_static-0.1.0.tar.bz2) + elseif (${example} STREQUAL "c_nodep_static") + set(example_tarball_name ignition-c_no_deps_static-0.1.0.tar.bz2) set(run_codecheck true) - elseif (${example} STREQUAL "core_child") - set(example_tarball_name ignition-core_child-0.1.0.tar.bz2) + elseif (${example} STREQUAL "c_child") + set(example_tarball_name ignition-c_child-0.1.0.tar.bz2) set(run_codecheck true) - elseif (${example} STREQUAL "core_child_private") - set(example_tarball_name ignition-core_child_private-0.1.0.tar.bz2) + elseif (${example} STREQUAL "c_child_private") + set(example_tarball_name ignition-c_child_private-0.1.0.tar.bz2) set(run_codecheck true) - elseif (${example} STREQUAL "core_static_child") - set(example_tarball_name ignition-core_static_child-0.1.0.tar.bz2) + elseif (${example} STREQUAL "c_static_child") + set(example_tarball_name ignition-c_static_child-0.1.0.tar.bz2) set(run_codecheck true) elseif (${example} STREQUAL "comp_deps") - set(example_tarball_name ignition-component_deps-0.1.0.tar.bz2) - elseif (${example} STREQUAL "use_component_depsA") - set(example_tarball_name ignition-use_component_depsa-0.1.0.tar.bz2) - elseif (${example} STREQUAL "use_component_depsB") - set(example_tarball_name ignition-use_component_depsb-0.1.0.tar.bz2) - elseif (${example} STREQUAL "use_component_depsC") - set(example_tarball_name ignition-use_component_depsc-0.1.0.tar.bz2) - elseif (${example} STREQUAL "use_config_ifp") + set(example_tarball_name ignition-comp_deps-0.1.0.tar.bz2) + elseif (${example} STREQUAL "comp_depsA") + set(example_tarball_name ignition-comp_depsa-0.1.0.tar.bz2) + elseif (${example} STREQUAL "comp_depsB") + set(example_tarball_name ignition-comp_depsb-0.1.0.tar.bz2) + elseif (${example} STREQUAL "comp_depsC") + set(example_tarball_name ignition-comp_depsc-0.1.0.tar.bz2) + elseif (${example} STREQUAL "config_ifp") set(example_tarball_name ignition-find_config-0.1.0.tar.bz2) else() @@ -67,7 +82,8 @@ foreach(example ${example_directories}) endif() foreach (build_type ${build_types}) - set(TEST_NAME ${example}_${build_type}) + short_build_type("${build_type}" bt_str) + set(TEST_NAME ${example}_${bt_str}) string(TIMESTAMP TEST_TIME) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/junit_pass.xml.in" @@ -77,7 +93,7 @@ foreach(example ${example_directories}) "${CMAKE_CURRENT_SOURCE_DIR}/junit_fail.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/test_results/${TEST_NAME}.xml" @ONLY) - set(example_INSTALL_DIR ${CMAKE_BINARY_DIR}/install/${build_type}) + set(example_INSTALL_DIR ${CMAKE_BINARY_DIR}/install/${b_str}) ExternalProject_Add( ${TEST_NAME} @@ -163,24 +179,25 @@ endforeach() # hard to use DEPENDS in ExternalProject_Add because targets # need to exist before they can be used there foreach (build_type ${build_types}) - add_dependencies(core_child_${build_type} core_nodep_${build_type}) - add_dependencies(core_child_private_${build_type} core_nodep_${build_type}) - add_dependencies(core_static_child_${build_type} core_nodep_static_${build_type}) - if (TARGET use_component_depsA_${build_type}) - add_dependencies(use_component_depsA_${build_type} comp_deps_${build_type}) + short_build_type(${build_type} bt_str) + add_dependencies(c_child_${bt_str} c_nodep_${bt_str}) + add_dependencies(c_child_private_${bt_str} c_nodep_${bt_str}) + add_dependencies(c_static_child_${bt_str} c_nodep_static_${bt_str}) + if (TARGET comp_depsA_${bt_str}) + add_dependencies(comp_depsA_${bt_str} comp_deps_${bt_str}) endif() - if (TARGET use_component_depsB_${build_type}) - add_dependencies(use_component_depsB_${build_type} comp_deps_${build_type}) + if (TARGET comp_depsB_${bt_str}) + add_dependencies(comp_depsB_${bt_str} comp_deps_${bt_str}) endif() - if (TARGET use_component_depsC_${build_type}) - add_dependencies(use_component_depsC_${build_type} comp_deps_${build_type}) + if (TARGET comp_depsC_${bt_str}) + add_dependencies(comp_depsC_${bt_str} comp_deps_${bt_str}) endif() endforeach() -# test that core_child pkg-config file requires core_nodep -# and that core_child_private pkg-config file requires core_nodep privately +# test that c_child pkg-config file requires c_nodep +# and that c_child_private pkg-config file requires c_nodep privately if (UNIX) - set(TEST_NAME core_child_requires_core_nodep) + set(TEST_NAME c_child_requires_c_nodep) string(TIMESTAMP TEST_TIME) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/junit_pass.xml.in" @@ -202,7 +219,7 @@ if (UNIX) list(APPEND _env_vars "PKG_CONFIG_PATH=${example_INSTALL_DIR}/${example_PKGCONFIG_INSTALL_LIBDIR}:${FAKE_INSTALL_PREFIX}/${example_PKGCONFIG_INSTALL_LIBDIR}:$PKG_CONFIG_PATH") add_test(${TEST_NAME} - ${CMAKE_CURRENT_SOURCE_DIR}/test_core_child_requires_core_no_deps.bash + ${CMAKE_CURRENT_SOURCE_DIR}/test_c_child_requires_c_no_deps.bash ) set_tests_properties(${TEST_NAME} PROPERTIES ENVIRONMENT "${_env_vars}") diff --git a/examples/core_child/CMakeLists.txt b/examples/c_child/CMakeLists.txt similarity index 75% rename from examples/core_child/CMakeLists.txt rename to examples/c_child/CMakeLists.txt index 2ebb6558..ee1afe6c 100644 --- a/examples/core_child/CMakeLists.txt +++ b/examples/c_child/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_child VERSION 0.1.0) +project(ignition-c_child VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() -ign_find_package(ignition-core_no_deps REQUIRED) +ign_find_package(ignition-c_no_deps REQUIRED) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_API_URL}") diff --git a/examples/core_child/README.md b/examples/c_child/README.md similarity index 100% rename from examples/core_child/README.md rename to examples/c_child/README.md diff --git a/examples/core_child/include/CMakeLists.txt b/examples/c_child/include/CMakeLists.txt similarity index 100% rename from examples/core_child/include/CMakeLists.txt rename to examples/c_child/include/CMakeLists.txt diff --git a/examples/core_child/src/CMakeLists.txt b/examples/c_child/src/CMakeLists.txt similarity index 82% rename from examples/core_child/src/CMakeLists.txt rename to examples/c_child/src/CMakeLists.txt index 82c11722..9ea9a1a4 100644 --- a/examples/core_child/src/CMakeLists.txt +++ b/examples/c_child/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-core_no_deps::ignition-core_no_deps) + ignition-c_no_deps::ignition-c_no_deps) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/core_child/src/empty.cc b/examples/c_child/src/empty.cc similarity index 100% rename from examples/core_child/src/empty.cc rename to examples/c_child/src/empty.cc diff --git a/examples/core_child/test/CMakeLists.txt b/examples/c_child/test/CMakeLists.txt similarity index 100% rename from examples/core_child/test/CMakeLists.txt rename to examples/c_child/test/CMakeLists.txt diff --git a/examples/core_child_private/CMakeLists.txt b/examples/c_child_private/CMakeLists.txt similarity index 72% rename from examples/core_child_private/CMakeLists.txt rename to examples/c_child_private/CMakeLists.txt index 180872b2..42507953 100644 --- a/examples/core_child_private/CMakeLists.txt +++ b/examples/c_child_private/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_child_private VERSION 0.1.0) +project(ignition-c_child_private VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() -ign_find_package(ignition-core_no_deps PRIVATE REQUIRED) +ign_find_package(ignition-c_no_deps PRIVATE REQUIRED) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_API_URL}") diff --git a/examples/core_child_private/README.md b/examples/c_child_private/README.md similarity index 100% rename from examples/core_child_private/README.md rename to examples/c_child_private/README.md diff --git a/examples/core_child_private/include/CMakeLists.txt b/examples/c_child_private/include/CMakeLists.txt similarity index 100% rename from examples/core_child_private/include/CMakeLists.txt rename to examples/c_child_private/include/CMakeLists.txt diff --git a/examples/core_child_private/src/CMakeLists.txt b/examples/c_child_private/src/CMakeLists.txt similarity index 82% rename from examples/core_child_private/src/CMakeLists.txt rename to examples/c_child_private/src/CMakeLists.txt index 29014808..11317c4c 100644 --- a/examples/core_child_private/src/CMakeLists.txt +++ b/examples/c_child_private/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE - ignition-core_no_deps::ignition-core_no_deps) + ignition-c_no_deps::ignition-c_no_deps) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/core_child_private/src/empty.cc b/examples/c_child_private/src/empty.cc similarity index 100% rename from examples/core_child_private/src/empty.cc rename to examples/c_child_private/src/empty.cc diff --git a/examples/core_child_private/test/CMakeLists.txt b/examples/c_child_private/test/CMakeLists.txt similarity index 100% rename from examples/core_child_private/test/CMakeLists.txt rename to examples/c_child_private/test/CMakeLists.txt diff --git a/examples/core_nodep/CMakeLists.txt b/examples/c_nodep/CMakeLists.txt similarity index 81% rename from examples/core_nodep/CMakeLists.txt rename to examples/c_nodep/CMakeLists.txt index e7260f78..6724dc72 100644 --- a/examples/core_nodep/CMakeLists.txt +++ b/examples/c_nodep/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_no_deps VERSION 0.1.0) +project(ignition-c_no_deps VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() ign_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/core_nodep/README.md b/examples/c_nodep/README.md similarity index 100% rename from examples/core_nodep/README.md rename to examples/c_nodep/README.md diff --git a/examples/core_nodep/include/CMakeLists.txt b/examples/c_nodep/include/CMakeLists.txt similarity index 100% rename from examples/core_nodep/include/CMakeLists.txt rename to examples/c_nodep/include/CMakeLists.txt diff --git a/examples/core_nodep/src/AlmostEmpty.cc b/examples/c_nodep/src/AlmostEmpty.cc similarity index 84% rename from examples/core_nodep/src/AlmostEmpty.cc rename to examples/c_nodep/src/AlmostEmpty.cc index 8826778b..9105cd06 100644 --- a/examples/core_nodep/src/AlmostEmpty.cc +++ b/examples/c_nodep/src/AlmostEmpty.cc @@ -15,13 +15,13 @@ * */ -#include +#include namespace gz { - namespace core_no_deps + namespace c_no_deps { - class IGNITION_CORE_NO_DEPS_VISIBLE AlmostEmpty + class IGNITION_C_NO_DEPS_VISIBLE AlmostEmpty { }; } diff --git a/examples/core_nodep/src/CMakeLists.txt b/examples/c_nodep/src/CMakeLists.txt similarity index 100% rename from examples/core_nodep/src/CMakeLists.txt rename to examples/c_nodep/src/CMakeLists.txt diff --git a/examples/core_nodep/test/CMakeLists.txt b/examples/c_nodep/test/CMakeLists.txt similarity index 100% rename from examples/core_nodep/test/CMakeLists.txt rename to examples/c_nodep/test/CMakeLists.txt diff --git a/examples/core_nodep_static/CMakeLists.txt b/examples/c_nodep_static/CMakeLists.txt similarity index 81% rename from examples/core_nodep_static/CMakeLists.txt rename to examples/c_nodep_static/CMakeLists.txt index 7d006f80..bb0f49ea 100644 --- a/examples/core_nodep_static/CMakeLists.txt +++ b/examples/c_nodep_static/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_no_deps_static VERSION 0.1.0) +project(ignition-c_no_deps_static VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() OPTION(BUILD_SHARED_LIBS OFF) diff --git a/examples/core_nodep_static/README.md b/examples/c_nodep_static/README.md similarity index 100% rename from examples/core_nodep_static/README.md rename to examples/c_nodep_static/README.md diff --git a/examples/core_nodep_static/include/CMakeLists.txt b/examples/c_nodep_static/include/CMakeLists.txt similarity index 100% rename from examples/core_nodep_static/include/CMakeLists.txt rename to examples/c_nodep_static/include/CMakeLists.txt diff --git a/examples/core_nodep_static/src/AlmostEmpty.cc b/examples/c_nodep_static/src/AlmostEmpty.cc similarity index 83% rename from examples/core_nodep_static/src/AlmostEmpty.cc rename to examples/c_nodep_static/src/AlmostEmpty.cc index 8ff32660..37920a29 100644 --- a/examples/core_nodep_static/src/AlmostEmpty.cc +++ b/examples/c_nodep_static/src/AlmostEmpty.cc @@ -15,13 +15,13 @@ * */ -#include +#include namespace gz { - namespace core_no_deps + namespace c_no_deps { - class IGNITION_CORE_NO_DEPS_STATIC_VISIBLE AlmostEmpty + class IGNITION_C_NO_DEPS_STATIC_VISIBLE AlmostEmpty { public: AlmostEmpty() = default; }; diff --git a/examples/core_nodep_static/src/CMakeLists.txt b/examples/c_nodep_static/src/CMakeLists.txt similarity index 100% rename from examples/core_nodep_static/src/CMakeLists.txt rename to examples/c_nodep_static/src/CMakeLists.txt diff --git a/examples/core_nodep_static/test/CMakeLists.txt b/examples/c_nodep_static/test/CMakeLists.txt similarity index 100% rename from examples/core_nodep_static/test/CMakeLists.txt rename to examples/c_nodep_static/test/CMakeLists.txt diff --git a/examples/core_static_child/CMakeLists.txt b/examples/c_static_child/CMakeLists.txt similarity index 73% rename from examples/core_static_child/CMakeLists.txt rename to examples/c_static_child/CMakeLists.txt index 166828e7..9a0c7e1e 100644 --- a/examples/core_static_child/CMakeLists.txt +++ b/examples/c_static_child/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_static_child VERSION 0.1.0) +project(ignition-c_static_child VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() -ign_find_package(ignition-core_no_deps_static REQUIRED) +ign_find_package(ignition-c_no_deps_static REQUIRED) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_STATIC_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_STATIC_API_URL}") diff --git a/examples/core_static_child/README.md b/examples/c_static_child/README.md similarity index 62% rename from examples/core_static_child/README.md rename to examples/c_static_child/README.md index 0f85f2e9..9589ccd7 100644 --- a/examples/core_static_child/README.md +++ b/examples/c_static_child/README.md @@ -1,9 +1,9 @@ # core\_static\_child example This package links against that static library provided by -the `core_no_deps_static` package. +the `c_no_deps_static` package. -To build, ensure that `core_no_deps_static` has been installed somewhere +To build, ensure that `c_no_deps_static` has been installed somewhere in your `CMAKE_PREFIX_PATH` and then run: ~~~ diff --git a/examples/core_static_child/include/CMakeLists.txt b/examples/c_static_child/include/CMakeLists.txt similarity index 100% rename from examples/core_static_child/include/CMakeLists.txt rename to examples/c_static_child/include/CMakeLists.txt diff --git a/examples/use_component_depsC/src/CMakeLists.txt b/examples/c_static_child/src/CMakeLists.txt similarity index 79% rename from examples/use_component_depsC/src/CMakeLists.txt rename to examples/c_static_child/src/CMakeLists.txt index 1344fa3f..92fa68fd 100644 --- a/examples/use_component_depsC/src/CMakeLists.txt +++ b/examples/c_static_child/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-component_deps::ignition-component_deps-child) + ignition-c_no_deps_static::ignition-c_no_deps_static) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/core_static_child/src/empty.cc b/examples/c_static_child/src/empty.cc similarity index 100% rename from examples/core_static_child/src/empty.cc rename to examples/c_static_child/src/empty.cc diff --git a/examples/core_static_child/test/CMakeLists.txt b/examples/c_static_child/test/CMakeLists.txt similarity index 100% rename from examples/core_static_child/test/CMakeLists.txt rename to examples/c_static_child/test/CMakeLists.txt diff --git a/examples/comp_deps/CMakeLists.txt b/examples/comp_deps/CMakeLists.txt index e8d3685f..34f9d1d9 100644 --- a/examples/comp_deps/CMakeLists.txt +++ b/examples/comp_deps/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-component_deps VERSION 0.1.0) +project(ignition-comp_deps VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() ign_configure_build(QUIT_IF_BUILD_ERRORS diff --git a/examples/comp_deps/src/AlmostEmpty.cc b/examples/comp_deps/src/AlmostEmpty.cc index bb7e0350..f61c7e57 100644 --- a/examples/comp_deps/src/AlmostEmpty.cc +++ b/examples/comp_deps/src/AlmostEmpty.cc @@ -15,13 +15,13 @@ * */ -#include +#include namespace gz { - namespace component_deps + namespace comp_deps { - class IGNITION_COMPONENT_DEPS_VISIBLE AlmostEmpty + class IGNITION_COMP_DEPS_VISIBLE AlmostEmpty { }; } diff --git a/examples/use_component_depsC/CMakeLists.txt b/examples/comp_depsA/CMakeLists.txt similarity index 62% rename from examples/use_component_depsC/CMakeLists.txt rename to examples/comp_depsA/CMakeLists.txt index 78f9c3fd..355ae846 100644 --- a/examples/use_component_depsC/CMakeLists.txt +++ b/examples/comp_depsA/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-use_component_depsC VERSION 0.1.0) +project(comp_depsA VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS child) +ign_find_package(ignition-comp_deps REQUIRED COMPONENTS parent child) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs() diff --git a/examples/use_component_depsA/README.md b/examples/comp_depsA/README.md similarity index 100% rename from examples/use_component_depsA/README.md rename to examples/comp_depsA/README.md diff --git a/examples/use_component_depsB/src/CMakeLists.txt b/examples/comp_depsA/src/CMakeLists.txt similarity index 79% rename from examples/use_component_depsB/src/CMakeLists.txt rename to examples/comp_depsA/src/CMakeLists.txt index 1344fa3f..fc7f341f 100644 --- a/examples/use_component_depsB/src/CMakeLists.txt +++ b/examples/comp_depsA/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-component_deps::ignition-component_deps-child) + ignition-comp_deps::ignition-comp_deps-child) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/use_component_depsA/src/empty.cc b/examples/comp_depsA/src/empty.cc similarity index 100% rename from examples/use_component_depsA/src/empty.cc rename to examples/comp_depsA/src/empty.cc diff --git a/examples/use_component_depsB/CMakeLists.txt b/examples/comp_depsB/CMakeLists.txt similarity index 60% rename from examples/use_component_depsB/CMakeLists.txt rename to examples/comp_depsB/CMakeLists.txt index c6d9b0e5..b583d89f 100644 --- a/examples/use_component_depsB/CMakeLists.txt +++ b/examples/comp_depsB/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-use_component_depsB VERSION 0.1.0) +project(comp_depsB VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS child parent) +ign_find_package(ignition-comp_deps REQUIRED COMPONENTS child parent) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs() diff --git a/examples/use_component_depsB/README.md b/examples/comp_depsB/README.md similarity index 82% rename from examples/use_component_depsB/README.md rename to examples/comp_depsB/README.md index 5102107a..7d684d44 100644 --- a/examples/use_component_depsB/README.md +++ b/examples/comp_depsB/README.md @@ -4,4 +4,4 @@ This package uses the `child` and `parent` components of `component\_deps` and calls `ign_find_package` with the components specified in the order `child parent`. Aside from the order in which the components are specified, -this package is identical to `use_component_depsA`. +this package is identical to `use_comp_depsA`. diff --git a/examples/use_component_depsA/src/CMakeLists.txt b/examples/comp_depsB/src/CMakeLists.txt similarity index 79% rename from examples/use_component_depsA/src/CMakeLists.txt rename to examples/comp_depsB/src/CMakeLists.txt index 1344fa3f..fc7f341f 100644 --- a/examples/use_component_depsA/src/CMakeLists.txt +++ b/examples/comp_depsB/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-component_deps::ignition-component_deps-child) + ignition-comp_deps::ignition-comp_deps-child) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/use_component_depsB/src/empty.cc b/examples/comp_depsB/src/empty.cc similarity index 100% rename from examples/use_component_depsB/src/empty.cc rename to examples/comp_depsB/src/empty.cc diff --git a/examples/comp_depsC/CMakeLists.txt b/examples/comp_depsC/CMakeLists.txt new file mode 100644 index 00000000..ff08860f --- /dev/null +++ b/examples/comp_depsC/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +project(comp_depsC VERSION 0.1.0) +find_package(ignition-cmake2 REQUIRED) +ign_configure_project() +ign_find_package(ignition-comp_deps REQUIRED COMPONENTS child) +ign_configure_build(QUIT_IF_BUILD_ERRORS) +ign_create_packages() +ign_create_docs() diff --git a/examples/use_component_depsC/README.md b/examples/comp_depsC/README.md similarity index 100% rename from examples/use_component_depsC/README.md rename to examples/comp_depsC/README.md diff --git a/examples/comp_depsC/src/CMakeLists.txt b/examples/comp_depsC/src/CMakeLists.txt new file mode 100644 index 00000000..fc7f341f --- /dev/null +++ b/examples/comp_depsC/src/CMakeLists.txt @@ -0,0 +1,6 @@ +ign_get_libsources_and_unittests(sources gtest_sources) +ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) +target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} + PUBLIC + ignition-comp_deps::ignition-comp_deps-child) +ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/use_component_depsC/src/empty.cc b/examples/comp_depsC/src/empty.cc similarity index 100% rename from examples/use_component_depsC/src/empty.cc rename to examples/comp_depsC/src/empty.cc diff --git a/examples/use_config_ifp/CMakeLists.txt b/examples/config_ifp/CMakeLists.txt similarity index 100% rename from examples/use_config_ifp/CMakeLists.txt rename to examples/config_ifp/CMakeLists.txt diff --git a/examples/use_config_ifp/Findignition-find_config.cmake b/examples/config_ifp/Findignition-find_config.cmake similarity index 100% rename from examples/use_config_ifp/Findignition-find_config.cmake rename to examples/config_ifp/Findignition-find_config.cmake diff --git a/examples/use_config_ifp/README.md b/examples/config_ifp/README.md similarity index 100% rename from examples/use_config_ifp/README.md rename to examples/config_ifp/README.md diff --git a/examples/use_config_ifp/ignition-find_configConfig.cmake b/examples/config_ifp/ignition-find_configConfig.cmake similarity index 100% rename from examples/use_config_ifp/ignition-find_configConfig.cmake rename to examples/config_ifp/ignition-find_configConfig.cmake diff --git a/examples/no_ignition_prefix/test/CMakeLists.txt b/examples/config_ifp/src/CMakeLists.txt similarity index 100% rename from examples/no_ignition_prefix/test/CMakeLists.txt rename to examples/config_ifp/src/CMakeLists.txt diff --git a/examples/core_static_child/src/CMakeLists.txt b/examples/core_static_child/src/CMakeLists.txt deleted file mode 100644 index 400f4ecd..00000000 --- a/examples/core_static_child/src/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -ign_get_libsources_and_unittests(sources gtest_sources) -ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) -target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} - PUBLIC - ignition-core_no_deps_static::ignition-core_no_deps_static) -ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/no_ignition_prefix/CMakeLists.txt b/examples/no_ign_prefix/CMakeLists.txt similarity index 85% rename from examples/no_ignition_prefix/CMakeLists.txt rename to examples/no_ign_prefix/CMakeLists.txt index 429eda91..c7838d6e 100644 --- a/examples/no_ignition_prefix/CMakeLists.txt +++ b/examples/no_ign_prefix/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(no_ignition_prefix VERSION 0.1.0) +project(no_ign_prefix VERSION 0.1.0) find_package(ignition-cmake2 REQUIRED) ign_configure_project( NO_IGNITION_PREFIX diff --git a/examples/no_ignition_prefix/README.md b/examples/no_ign_prefix/README.md similarity index 100% rename from examples/no_ignition_prefix/README.md rename to examples/no_ign_prefix/README.md diff --git a/examples/no_ignition_prefix/include/CMakeLists.txt b/examples/no_ign_prefix/include/CMakeLists.txt similarity index 100% rename from examples/no_ignition_prefix/include/CMakeLists.txt rename to examples/no_ign_prefix/include/CMakeLists.txt diff --git a/examples/no_ignition_prefix/include/no_ign/CMakeLists.txt b/examples/no_ign_prefix/include/no_ign/CMakeLists.txt similarity index 100% rename from examples/no_ignition_prefix/include/no_ign/CMakeLists.txt rename to examples/no_ign_prefix/include/no_ign/CMakeLists.txt diff --git a/examples/no_ignition_prefix/include/no_ign/config.hh.in b/examples/no_ign_prefix/include/no_ign/config.hh.in similarity index 100% rename from examples/no_ignition_prefix/include/no_ign/config.hh.in rename to examples/no_ign_prefix/include/no_ign/config.hh.in diff --git a/examples/no_ignition_prefix/src/AlmostEmpty.cc b/examples/no_ign_prefix/src/AlmostEmpty.cc similarity index 89% rename from examples/no_ignition_prefix/src/AlmostEmpty.cc rename to examples/no_ign_prefix/src/AlmostEmpty.cc index d3029192..ce4f4545 100644 --- a/examples/no_ignition_prefix/src/AlmostEmpty.cc +++ b/examples/no_ign_prefix/src/AlmostEmpty.cc @@ -15,13 +15,13 @@ * */ -#include +#include #include #include namespace no_ignition_prefix { - class IGNITION_NO_IGNITION_PREFIX_VISIBLE AlmostEmpty + class IGNITION_NO_IGN_PREFIX_VISIBLE AlmostEmpty { }; } diff --git a/examples/no_ignition_prefix/src/CMakeLists.txt b/examples/no_ign_prefix/src/CMakeLists.txt similarity index 100% rename from examples/no_ignition_prefix/src/CMakeLists.txt rename to examples/no_ign_prefix/src/CMakeLists.txt diff --git a/examples/use_config_ifp/src/CMakeLists.txt b/examples/no_ign_prefix/test/CMakeLists.txt similarity index 100% rename from examples/use_config_ifp/src/CMakeLists.txt rename to examples/no_ign_prefix/test/CMakeLists.txt diff --git a/examples/test_c_child_requires_c_no_deps.bash b/examples/test_c_child_requires_c_no_deps.bash new file mode 100755 index 00000000..89e18890 --- /dev/null +++ b/examples/test_c_child_requires_c_no_deps.bash @@ -0,0 +1,54 @@ +#!/bin/bash +TEST_STATUS=0 + +echo +echo Expect ignition-c_child to require ignition-c_no_deps +pkg-config ignition-c_child --print-requires +if ! pkg-config ignition-c_child --print-requires \ + | grep ignition-c_no_deps +then + echo oops + TEST_STATUS=1 +fi + +echo +echo Expect ignition-c_child to not privately require ignition-c_no_deps +pkg-config ignition-c_child --print-requires-private +if pkg-config ignition-c_child --print-requires-private \ + | grep ignition-c_no_deps +then + echo oops + TEST_STATUS=1 +fi + +echo +echo Expect ignition-c_child_private to privately require ignition-c_no_deps +pkg-config ignition-c_child_private --print-requires-private +if ! pkg-config ignition-c_child_private --print-requires-private \ + | grep ignition-c_no_deps +then + echo oops + TEST_STATUS=1 +fi + +echo +echo Expect ignition-c_child_private to not require ignition-c_no_deps +pkg-config ignition-c_child_private --print-requires +if pkg-config ignition-c_child_private --print-requires \ + | grep ignition-c_no_deps +then + echo oops + TEST_STATUS=1 +fi + +echo +if [[ $TEST_STATUS -eq 0 ]] +then + echo Successfully detected ignition-c_nodep requirements + cp c_child_requires_c_nodep_pass.xml ../test_results/c_child_requires_c_nodep.xml + exit 0 +else + echo Could not detect all ignition-c_nodep requirements correctly + cp c_child_requires_c_nodep_fail.xml ../test_results/c_child_requires_c_nodep.xml + exit 1 +fi diff --git a/examples/test_core_child_requires_core_no_deps.bash b/examples/test_core_child_requires_core_no_deps.bash deleted file mode 100755 index 9febf845..00000000 --- a/examples/test_core_child_requires_core_no_deps.bash +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -TEST_STATUS=0 - -echo -echo Expect ignition-core_child to require ignition-core_no_deps -pkg-config ignition-core_child --print-requires -if ! pkg-config ignition-core_child --print-requires \ - | grep ignition-core_no_deps -then - echo oops - TEST_STATUS=1 -fi - -echo -echo Expect ignition-core_child to not privately require ignition-core_no_deps -pkg-config ignition-core_child --print-requires-private -if pkg-config ignition-core_child --print-requires-private \ - | grep ignition-core_no_deps -then - echo oops - TEST_STATUS=1 -fi - -echo -echo Expect ignition-core_child_private to privately require ignition-core_no_deps -pkg-config ignition-core_child_private --print-requires-private -if ! pkg-config ignition-core_child_private --print-requires-private \ - | grep ignition-core_no_deps -then - echo oops - TEST_STATUS=1 -fi - -echo -echo Expect ignition-core_child_private to not require ignition-core_no_deps -pkg-config ignition-core_child_private --print-requires -if pkg-config ignition-core_child_private --print-requires \ - | grep ignition-core_no_deps -then - echo oops - TEST_STATUS=1 -fi - -echo -if [[ $TEST_STATUS -eq 0 ]] -then - echo Successfully detected ignition-core_nodep requirements - cp core_child_requires_core_nodep_pass.xml ../test_results/core_child_requires_core_nodep.xml - exit 0 -else - echo Could not detect all ignition-core_nodep requirements correctly - cp core_child_requires_core_nodep_fail.xml ../test_results/core_child_requires_core_nodep.xml - exit 1 -fi diff --git a/examples/use_component_depsA/CMakeLists.txt b/examples/use_component_depsA/CMakeLists.txt deleted file mode 100644 index 0f998291..00000000 --- a/examples/use_component_depsA/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-use_component_depsA VERSION 0.1.0) -find_package(ignition-cmake2 REQUIRED) -ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS parent child) -ign_configure_build(QUIT_IF_BUILD_ERRORS) -ign_create_packages() -ign_create_docs()