Skip to content

Commit

Permalink
Merge branch 'master' into optional
Browse files Browse the repository at this point in the history
  • Loading branch information
tmayoff committed Apr 28, 2024
2 parents 97c8f42 + 33e4af6 commit cde05d0
Show file tree
Hide file tree
Showing 35 changed files with 668 additions and 244 deletions.
137 changes: 78 additions & 59 deletions .github/workflows/build_and_test.yml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
-DBUILD_SHARED_LIBS=TRUE \
-DCMAKE_BUILD_TYPE=Debug \
-DOPENDDS_BOOTTIME_TIMERS=TRUE \
-DOPENDDS_COMPILE_WARNINGS=WARNING \
-DOPENDDS_SECURITY=TRUE \
-DOPENDDS_ACE_TAO_SRC=$GITHUB_WORKSPACE/OpenDDS/build/ACE_TAO \
-DOPENDDS_MPC=$GITHUB_WORKSPACE/MPC \
Expand Down Expand Up @@ -132,6 +133,7 @@ jobs:
-DCMAKE_UNITY_BUILD=TRUE \
-DBUILD_SHARED_LIBS=FALSE \
-DCMAKE_BUILD_TYPE=Debug \
-DOPENDDS_COMPILE_WARNINGS=WARNING \
-DOPENDDS_ACE_TAO_SRC=$GITHUB_WORKSPACE/OpenDDS/build/ACE_TAO \
-DOPENDDS_MPC=$GITHUB_WORKSPACE/MPC \
-DOPENDDS_BUILD_TESTS=TRUE \
Expand Down Expand Up @@ -176,6 +178,7 @@ jobs:
-DCMAKE_UNITY_BUILD=TRUE \
-DBUILD_SHARED_LIBS=TRUE \
-DCMAKE_BUILD_TYPE=Debug \
-DOPENDDS_COMPILE_WARNINGS=WARNING \
-DOPENDDS_ACE_TAO_SRC=$GITHUB_WORKSPACE/OpenDDS/build/ACE_TAO \
-DOPENDDS_MPC=$GITHUB_WORKSPACE/MPC \
-DOPENDDS_BUILD_TESTS=TRUE \
Expand Down Expand Up @@ -228,6 +231,7 @@ jobs:
cmake -B build-host \
-G Ninja \
-DBUILD_SHARED_LIBS=FALSE \
-DOPENDDS_COMPILE_WARNINGS=WARNING \
-DOPENDDS_JUST_BUILD_HOST_TOOLS=TRUE
- uses: ammaraskar/gcc-problem-matcher@0.3.0
- name: Build Host Tools
Expand All @@ -242,6 +246,7 @@ jobs:
-DBUILD_SHARED_LIBS=TRUE \
-DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-29 \
--toolchain ${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
-DOPENDDS_COMPILE_WARNINGS=WARNING \
-DOPENDDS_CMAKE_VERBOSE=all \
-DOPENDDS_HOST_TOOLS=$(realpath build-host)
- name: Build Target
Expand Down Expand Up @@ -287,6 +292,7 @@ jobs:
cd OpenDDS
cmake -B build^
-DBUILD_SHARED_LIBS=TRUE^
-DOPENDDS_COMPILE_WARNINGS=WARNING^
-DOPENDDS_ACE_TAO_SRC=${{ github.workspace }}\OpenDDS\build\ACE_TAO^
-DOPENDDS_MPC=${{ github.workspace }}\MPC^
-DOPENDDS_XERCES3=${{ env.VCPKG_INSTALLED_DIR }}/x64-windows^
Expand Down Expand Up @@ -343,6 +349,7 @@ jobs:
cmake -B build^
-DCMAKE_UNITY_BUILD=TRUE^
-DBUILD_SHARED_LIBS=FALSE^
-DOPENDDS_COMPILE_WARNINGS=WARNING^
-DOPENDDS_ACE_TAO_SRC=${{ github.workspace }}\OpenDDS\build\ACE_TAO^
-DOPENDDS_MPC=${{ github.workspace }}\MPC^
-DOPENDDS_XERCES3=${{ env.VCPKG_INSTALLED_DIR }}/x64-windows^
Expand Down Expand Up @@ -400,6 +407,7 @@ jobs:
cmake -B build^
-DCMAKE_UNITY_BUILD=TRUE^
-DBUILD_SHARED_LIBS=TRUE^
-DOPENDDS_COMPILE_WARNINGS=WARNING^
-DOPENDDS_ACE_TAO_SRC=${{ github.workspace }}\OpenDDS\build\ACE_TAO^
-DOPENDDS_MPC=${{ github.workspace }}\MPC^
-DOPENDDS_XERCES3=${{ env.VCPKG_INSTALLED_DIR }}/x64-windows^
Expand Down Expand Up @@ -456,6 +464,7 @@ jobs:
cmake -B build^
-DCMAKE_UNITY_BUILD=TRUE^
-DBUILD_SHARED_LIBS=FALSE^
-DOPENDDS_COMPILE_WARNINGS=WARNING^
-DOPENDDS_ACE_TAO_SRC=${{ github.workspace }}\OpenDDS\build\ACE_TAO^
-DOPENDDS_MPC=${{ github.workspace }}\MPC^
-DOPENDDS_XERCES3=${{ env.VCPKG_INSTALLED_DIR }}/x64-windows^
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ishapes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ jobs:
cd OpenDDS
perl configure --optimize --no-debug --static --tests ^
"--qt=%VCPKG_INSTALLED_DIR%/x64-windows" ^
"--mpcopts=-value_template platforms=x64" ^
"--mpcopts=-value_template configurations=Release" ^
"--mpcopts=-value_template Release::runtime_library=MultiThreadedDLL"
"--mpc:value_template platforms=x64" ^
"--mpc:value_template configurations=Release" ^
"--mpc:value_template Release::runtime_library=MultiThreadedDLL"
tools\scripts\show_build_config.pl
- name: build
shell: cmd
Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/update-ace-tao.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,37 @@ jobs:
run: |
cd OpenDDS
GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}} perl tools/scripts/gitrelease.pl --update-ace-tao
# Help make the title and message for commit and PR
perl tools/scripts/modules/ini.pm acetao.ini --join ', ' '.*/version' > ../acevers
echo "ACEVERS=$(cat ../acevers)" >> $GITHUB_ENV
perl tools/scripts/modules/ini.pm acetao.ini --join ', ' '.*/url' > ../acevers_urls
echo "ACEVERS_URLS=$(cat ../acevers_urls)" >> $GITHUB_ENV
prefix="$GITHUB_WORKSPACE/update-ace-tao-"
commit_msg="${prefix}commit.md"
# Only commit and make a PR if the release script recognized a change
# from both master and workflows/update-ace-tao if it exists.
if [ -f "${commit_msg}" ]
then
echo "CREATE_PULL_REQUEST=true" >> $GITHUB_ENV
# create-pull-request can commit for us, but manually commit here so
# we can use file input for the commit message.
# https://github.com/peter-evans/create-pull-request/issues/2864
git config user.name GitHub
git config user.email noreply@github.com
git add --all
git commit --file "${commit_msg}" \
--author "${{github.actor}} <${{github.actor}}@users.noreply.github.com>"
echo "PR_TITLE=$(cat ${prefix}pr-title.md)" >> $GITHUB_ENV
echo "PR_BODY_FILE=${prefix}pr-body.md" >> $GITHUB_ENV
else
echo "CREATE_PULL_REQUEST=false" >> $GITHUB_ENV
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
if: env.CREATE_PULL_REQUEST == 'true'
id: cpr
with:
path: OpenDDS
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
Update ACE/TAO to ${{env.ACEVERS}}
The releases are ${{env.ACEVERS_URLS}}
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: workflows/update-ace-tao
delete-branch: true
title: Update ACE/TAO to ${{env.ACEVERS}}
body: "Releases: ${{env.ACEVERS_URLS}}"
title: ${{env.PR_TITLE}}
body-path: ${{env.PR_BODY_FILE}}
labels: |
dependencies
- name: Check outputs
Expand Down
6 changes: 5 additions & 1 deletion acetao.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# This file contains the common info for ACE/TAO releases. Insead of editing
# this directly, run:
# GITHUB_TOKEN=... ./tools/scripts/gitrelease.pl --update-ace-tao
# tools/scripts/gitrelease.pl --update-ace-tao

[ace6tao2]
hold=0
desc=ACE 6/TAO 2
version=6.5.20
repo=https://github.com/DOCGroup/ACE_TAO.git
branch=ace6tao2
Expand All @@ -18,6 +20,8 @@ tar.bz2-url=https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-6_5_
tar.bz2-md5=2551d7d445456bcb316fe5e9a4b514ea

[ace7tao3]
hold=1
desc=ACE 7/TAO 3
version=7.1.3
repo=https://github.com/DOCGroup/ACE_TAO.git
branch=master
Expand Down
15 changes: 15 additions & 0 deletions build.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Clang]
warning=-Wall -Wpedantic -Wno-unused -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wundef
error=-Werror

[AppleClang]
warning=-Wall -Wpedantic -Wno-unused -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wundef
error=-Werror

[GNU]
warning=-Wall -Wpedantic -Wno-unused -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wundef
error=-Werror

[MSVC]
warning=/W4
error=/WX
2 changes: 1 addition & 1 deletion cmake/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Config Package for CMake Integration

Please take a look at the [documentation](../docs/cmake.md) for further details.
Please take a look at the [CMake documentation](https://opendds.readthedocs.io/en/latest-release/devguide/building/cmake.html) for further details.
6 changes: 0 additions & 6 deletions cmake/ace_group.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/import_common.cmake")

_opendds_group(ACE DEFAULT_REQUIRED ACE::ACE)

if(_OPENDDS_ACE_MPC_NAME_IS_ACE_TARGET)
set(_mpc_name ACE-target)
else()
set(_mpc_name ACE)
endif()
_opendds_group_lib(ACE
MPC_NAME "${_mpc_name}"
DEPENDS Threads::Threads
)
_opendds_group_lib(XML_Utils
Expand Down
4 changes: 0 additions & 4 deletions cmake/build_ace_tao.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
include(ExternalProject)

if(_OPENDDS_MPC_TYPE STREQUAL gnuace)
set(_OPENDDS_TAO_MPC_NAME_IS_TAO_TARGET TRUE CACHE INTERNAL "")
endif()

if(OPENDDS_JUST_BUILD_HOST_TOOLS)
set(ws "${OPENDDS_BUILD_DIR}/host-tools.mwc")
file(WRITE "${ws}"
Expand Down
3 changes: 0 additions & 3 deletions cmake/get_ace_tao.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ if(EXISTS "${OPENDDS_ACE_TAO_SRC}/ace/Version.h")
set(OPENDDS_ACE "${OPENDDS_ACE_TAO_SRC}" CACHE INTERNAL "")
elseif(EXISTS "${OPENDDS_ACE_TAO_SRC}/ACE/ace/Version.h")
set(OPENDDS_ACE "${OPENDDS_ACE_TAO_SRC}/ACE" CACHE INTERNAL "")
if(_OPENDDS_MPC_TYPE STREQUAL gnuace)
set(_OPENDDS_ACE_MPC_NAME_IS_ACE_TARGET TRUE CACHE INTERNAL "")
endif()
else()
message(FATAL_ERROR "Can't find ace/Version.h in ${OPENDDS_ACE}")
endif()
Expand Down
17 changes: 13 additions & 4 deletions cmake/import_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,20 @@ endfunction()
function(_opendds_find_in_mpc_projects found_var path_var mpc_projects mpc_name config)
string(JSON mpc_project ERROR_VARIABLE err GET "${mpc_projects}" "${mpc_name}")
if(NOT mpc_project)
set(${found_var} FALSE CACHE INTERNAL "" FORCE)
if(debug)
message(STATUS "lib ${target} (${mpc_name}) not in MPC projects")
# The ACE and TAO libraries targets from MPC might be called ACE-target and
# TAO-target depending on if they're in directories of the same name. It
# should be trivial to predict this, but the path logic for this in MPC
# seems buggy and might not prepend -target when OPENDDS_ACE_TAO_SRC is
# outside of the build directory, so we're just going to check both for all
# targets.
string(JSON mpc_project ERROR_VARIABLE err GET "${mpc_projects}" "${mpc_name}-target")
if(NOT mpc_project)
set(${found_var} FALSE CACHE INTERNAL "" FORCE)
if(debug)
message(STATUS "lib ${target} (${mpc_name} or ${mpc_name}-target) not in MPC projects")
endif()
return()
endif()
return()
endif()
string(JSON configs ERROR_VARIABLE err GET "${mpc_project}" "configs")
if(config AND configs)
Expand Down
28 changes: 25 additions & 3 deletions cmake/opendds_build_helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ set(_opendds_exec_perms
GROUP_READ GROUP_WRITE GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)

function(_opendds_alias target)
# Load in build settings.
file(STRINGS "${OPENDDS_SOURCE_DIR}/build.ini" build_ini)
unset(section)
foreach(line IN LISTS build_ini)
if(line MATCHES "^\\[(.*)\\]$")
set(section "${CMAKE_MATCH_1}")
elseif(section AND line MATCHES "^([^=#]+)=(.*)$")
set(name "${CMAKE_MATCH_1}")
set(value "${CMAKE_MATCH_2}")
set("${section}-${name}" "${value}")
endif()
endforeach()

function(_opendds_target target)
# This is the name the target should be exported from CMake-build OpenDDS as
# or imported in the MPC-built OpenDDS CMake package. For consistency and
# convenience, alias it so we can use it within the OpenDDS CMake build.
Expand All @@ -18,6 +31,15 @@ function(_opendds_alias target)
add_executable("${name}" ALIAS "${target}")
endif()
set_target_properties(${target} PROPERTIES EXPORT_NAME "${name}")

if(OPENDDS_COMPILE_WARNINGS STREQUAL "WARNING" OR OPENDDS_COMPILE_WARNINGS STREQUAL "ERROR")
string(REPLACE " " ";" outvar ${${CMAKE_CXX_COMPILER_ID}-warning})
target_compile_options(${target} PRIVATE ${outvar})
if(OPENDDS_COMPILE_WARNINGS STREQUAL "ERROR")
string(REPLACE " " ";" outvar ${{CMAKE_CXX_COMPILER_ID}-error})
target_compile_options(${target} PRIVATE ${outvar})
endif()
endif()
endfunction()

function(_opendds_library target)
Expand All @@ -27,7 +49,7 @@ function(_opendds_library target)
cmake_parse_arguments(arg
"${no_value_options}" "${single_value_options}" "${multi_value_options}" ${ARGN})

_opendds_alias(${target})
_opendds_target(${target})
_opendds_cxx_std(${target} PUBLIC)
target_link_libraries(${target} PUBLIC OpenDDS_Config)

Expand Down Expand Up @@ -83,7 +105,7 @@ function(_opendds_executable target)
cmake_parse_arguments(arg
"${no_value_options}" "${single_value_options}" "${multi_value_options}" ${ARGN})

_opendds_alias(${target})
_opendds_target(${target})
_opendds_cxx_std(${target} PRIVATE)
target_link_libraries(${target} PRIVATE OpenDDS_Config)
set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OPENDDS_BIN_DIR}")
Expand Down
6 changes: 0 additions & 6 deletions cmake/tao_group.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/import_common.cmake")

_opendds_group(TAO DEFAULT_REQUIRED TAO::TAO TAO::tao_idl)

if(_OPENDDS_TAO_MPC_NAME_IS_TAO_TARGET)
set(_mpc_name TAO-target)
else()
set(_mpc_name TAO)
endif()
_opendds_group_lib(TAO
MPC_NAME "${_mpc_name}"
DEPENDS ACE::ACE
)
_opendds_group_lib(IDL_FE
Expand Down

0 comments on commit cde05d0

Please sign in to comment.