diff options
author | James Hill <james@onehilltech.com> | 2021-11-14 21:33:53 -0500 |
---|---|---|
committer | James Hill <james@onehilltech.com> | 2021-11-14 21:33:53 -0500 |
commit | 7b5fe9d3b3fd04c34123a1933384b2d1de0fec4f (patch) | |
tree | e9b578db806c3ce74b6fa1a81e7a46e2ce777ffe | |
parent | 69a76b240d052aadce316f564561c675dffec2bd (diff) | |
parent | f167fbd9f85405b0ce1072b0cad13f64557ced7f (diff) | |
download | MPC-7b5fe9d3b3fd04c34123a1933384b2d1de0fec4f.tar.gz |
chore: merge master
45 files changed, 592 insertions, 264 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..6077d357 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# Set update schedule for GitHub Actions +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml new file mode 100644 index 00000000..82dd9d80 --- /dev/null +++ b/.github/workflows/fuzz.yml @@ -0,0 +1,33 @@ +name: fuzz + +on: + push: + pull_request: + schedule: + - cron: '0 1 * * SUN' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + DOC_ROOT: ${{ github.workspace }}/ACE + ACE_ROOT: ${{ github.workspace }}/ACE/ACE + TAO_ROOT: ${{ github.workspace }}/ACE/TAO + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout MPC + uses: actions/checkout@v2 + - name: checkout ACE_TAO + uses: actions/checkout@v2 + with: + repository: DOCGroup/ACE_TAO + path: ${{ env.DOC_ROOT }} + - name: Run fuzz + run: | + perl ${env:ACE_ROOT}/bin/fuzz.pl + shell: pwsh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 00000000..412382a9 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,89 @@ +name: linux + +on: + push: + pull_request: + schedule: + - cron: '0 1 * * SUN' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + matrix: + include: + - CC: gcc-10 + CXX: g++-10 + PackageDeps: g++-10 + platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU + os: ubuntu-20.04 + runs-on: ${{ matrix.os }} + name: ${{ matrix.os }} ${{ matrix.CXX }} ${{ matrix.feature }} + env: + DOC_ROOT: ${{ github.workspace }}/ACE_TAO + ACE_ROOT: ${{ github.workspace }}/ACE_TAO/ACE + TAO_ROOT: ${{ github.workspace }}/ACE_TAO/TAO + MPC_ROOT: ${{ github.workspace }}/ + CC: ${{ matrix.CC }} + CXX: ${{ matrix.CXX }} + steps: + - name: checkout MPC + uses: actions/checkout@v2 + - name: checkout ACE_TAO + uses: actions/checkout@v2 + with: + repository: DOCGroup/ACE_TAO + path: ${{ env.DOC_ROOT }} + - name: Add Repo + run: | + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - + sudo apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ ${{ matrix.Repo }} main" + if: matrix.Repo != '' + - name: Add packages + run: | + sudo apt-get --yes update + sudo apt-get --yes install libxerces-c-dev libssl-dev ${{ matrix.PackageDeps }} + - name: create $ACE_ROOT/ace/config.h + run: | + '#include "ace/config-linux.h"' > ${env:ACE_ROOT}/ace/config.h + shell: pwsh + - name: create $ACE_ROOT/include/makeinclude/platform_macros.GNU + run: | + 'ipv6=1' > ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + 'xerces3=1' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + 'ssl=1' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + 'zlib=1' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + shell: pwsh + - name: add optional optional macros + run: | + '${{ matrix.optional_macros }}' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + shell: pwsh + if: matrix.optional_macros != '' + - name: extend $ACE_ROOT/include/makeinclude/platform_macros.GNU + run: | + '${{ matrix.platform_file }}' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + shell: pwsh + - name: create $ACE_ROOT/bin/MakeProjectCreator/config/default.features + run: | + 'ipv6=1' > ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + 'xerces3=1' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + 'ssl=1' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + 'zlib=1' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + shell: pwsh + - name: add optional optional feature + run: | + '${{ matrix.optional_feature }}' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + if: matrix.optional_feature != '' + shell: pwsh + - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc + run: | + perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4 + shell: pwsh + - name: Build TAO_ACE project + run: | + make -j 6 -C ${env:TAO_ROOT} + shell: pwsh diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml new file mode 100644 index 00000000..1da403a9 --- /dev/null +++ b/.github/workflows/macosx.yml @@ -0,0 +1,61 @@ +name: macosx + +on: + push: + pull_request: + schedule: + - cron: '0 1 * * SUN' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + matrix: + cxxstd: ["11"] + os: [macos-10.15, macos-11.0] + include: + - platform_file: include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU + runs-on: ${{ matrix.os }} + name: "${{ matrix.os }}-C++${{ matrix.cxxstd }}" + env: + DOC_ROOT: ${{ github.workspace }}/ACE_TAO + ACE_ROOT: ${{ github.workspace }}/ACE_TAO/ACE + TAO_ROOT: ${{ github.workspace }}/ACE_TAO/TAO + MPC_ROOT: ${{ github.workspace }}/ + steps: + - name: checkout MPC + uses: actions/checkout@v2 + - name: checkout ACE/TAO + uses: actions/checkout@v2 + with: + repository: DOCGroup/ACE_TAO + path: ${{ env.DOC_ROOT }} + - name: create $ACE_ROOT/ace/config.h + run: | + '#include "ace/config-macosx.h"' > ${env:ACE_ROOT}/ace/config.h + shell: pwsh + - name: Add c++${{ matrix.cxxstd }} platform_macros.GNU + run: | + 'c++${{ matrix.cxxstd }}=1' > ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + shell: pwsh + - name: create $ACE_ROOT/include/makeinclude/platform_macros.GNU + run: | + '${{ matrix.platform_file }}' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU + shell: pwsh + - name: create $ACE_ROOT/bin/MakeProjectCreator/config/default.features + run: | + 'ipv6=1' > ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + 'versioned_namespace=1' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + shell: pwsh + - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc + run: | + perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4 + shell: pwsh + - name: Build TAO_ACE project + run: | + make -j 6 -C ${env:TAO_ROOT} + shell: pwsh diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..63725a2a --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,108 @@ +name: windows + +on: + push: + pull_request: + schedule: + - cron: '0 1 * * SUN' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - name: VS2017Debug64 + vmimage: windows-2016 + mpctype: vs2017 + BuildPlatform: x64 + BuildConfiguration: Debug + vcpkgarch: x64-windows + vcpkglibdir: debug/lib + vcpkgpackages: openssl xerces-c zlib + - name: VS2019Debug64 + vmimage: windows-2019 + mpctype: vs2019 + BuildPlatform: x64 + BuildConfiguration: Debug + vcpkgarch: x64-windows + vcpkglibdir: debug/lib + vcpkgpackages: openssl xerces-c zlib + - name: VS2019Release32 + vmimage: windows-2019 + mpctype: vs2019 + BuildPlatform: Win32 + BuildConfiguration: Release + vcpkgarch: x86-windows + vcpkglibdir: lib + vcpkgpackages: openssl xerces-c zlib + - name: VS2022Debug64 + vmimage: windows-2022 + mpctype: vs2022 + BuildPlatform: x64 + BuildConfiguration: Debug + vcpkgarch: x64-windows + vcpkglibdir: debug/lib + vcpkgpackages: openssl xerces-c zlib + runs-on: ${{ matrix.vmimage }} + name: ${{ matrix.name }} + env: + DOC_ROOT: ${{ github.workspace }}/ACE_TAO + ACE_ROOT: ${{ github.workspace }}/ACE_TAO/ACE + TAO_ROOT: ${{ github.workspace }}/ACE_TAO/TAO + MPC_ROOT: ${{ github.workspace }}/ + VCPKG_ROOT: ${{ github.workspace }}/vcpkg + XERCESC_INCDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/include + XERCESC_LIBDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }} + SSL_INCDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/include + SSL_LIBDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }} + ZLIB_INCDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/include + ZLIB_LIBDIR: ${{ github.workspace }}/vcpkg/installed/${{ matrix.vcpkgarch }}/${{ matrix.vcpkglibdir }} + steps: + - name: checkout MPC + uses: actions/checkout@v2 + - name: checkout ACE_TAO + uses: actions/checkout@v2 + with: + repository: DOCGroup/ACE_TAO + path: ${{ env.DOC_ROOT }} + - name: Install vcpkg + uses: lukka/run-vcpkg@v7 + with: + vcpkgGitCommitId: 70033dbb31527fb3e69654731f540f59c87787f9 + vcpkgArguments: --recurse ${{ matrix.vcpkgpackages }} + vcpkgTriplet: ${{ matrix.vcpkgarch }} + appendedCacheKey: ${{ matrix.name }} + - name: create $ACE_ROOT/ace/config.h + run: | + '#include "ace/config-win32.h"' > ${env:ACE_ROOT}/ace/config.h + shell: pwsh + - name: create $ACE_ROOT/bin/MakeProjectCreator/config/default.features + run: | + echo "ipv6=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + echo "xerces3=1" | out-file -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + echo "ssl=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + echo "openssl11=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + echo "versioned_namespace=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + echo "zlib=1" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + shell: pwsh + - name: Add optional features ${{ matrix.OptionalFeatures }} + run: | + echo "${{ matrix.OptionalFeatures }}" | out-file -append -encoding ASCII ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features + shell: pwsh + if: matrix.OptionalFeatures != '' + - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc + run: | + perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4 + shell: pwsh + - name: Setup msbuild + uses: microsoft/setup-msbuild@v1 + - name: Build solution $(TAO_ROOT)/TAO_ACE.sln + run: | + msbuild -maxcpucount -p:Platform=${{ matrix.BuildPlatform }} -p:Configuration=${{ matrix.BuildConfiguration }} ${env:TAO_ROOT}/TAO_ACE.sln + shell: pwsh @@ -11,7 +11,7 @@ Mon Jan 6 06:21:29 UTC 2020 Chad Elliott <elliottc@objectcomputing.com> * modules/ProjectCreator.pm: Make a copy of the flag override hash when connecting it to a - file so that we do not inadvertantly modify multiple flag overrides + file so that we do not inadvertently modify multiple flag overrides when modifying flag overrides for a single file. Mon Jul 1 18:35:43 UTC 2019 Chad Elliott <elliottc@objectcomputing.com> @@ -155,7 +155,7 @@ Thu Apr 18 22:18:20 UTC 2019 Chad Elliott <elliott_c@ociweb.com> * templates/iar.mpt: Added an initial, simplistic IAR workspace/project generator. - There will be more changes to fully suport this IDE. + There will be more changes to fully support this IDE. Mon May 21 14:33:24 UTC 2018 Adam Mitz <mitza@objectcomputing.com> diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 00000000..5a6e92e7 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,5 @@ +[default.extend-words] +mosquitto = "mosquitto" + +[files] +extend-exclude = ["templates/*.*", "history/*"] diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 2c780e26..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,187 +0,0 @@ -variables: - DOC_ROOT: $(Build.SourcesDirectory)/ACE_TAO - ACE_ROOT: $(DOC_ROOT)/ACE - MPC_ROOT: $(Build.SourcesDirectory) - TAO_ROOT: $(DOC_ROOT)/TAO - CIAO_ROOT: $(DOC_ROOT)/CIAO - DAnCE_ROOT: $(Build.SourcesDirectory)/DAnCE - DDS_ROOT: $(Build.SourcesDirectory)/DDS - system.prefergit: true - -schedules: -- cron: "0 7 * * SUN" - displayName: Weekly Sunday - branches: - include: - - master - always: true - -resources: -- repo: self - fetchDepth: 1 - -jobs: -- job: VisualStudio2019 - timeoutInMinutes: 90 - pool: - vmImage: windows-2019 - strategy: - matrix: - Debug64: - BuildPlatform: x64 - BuildConfiguration: Debug - vcpkgarch: x64-windows - vcpkglibdir: debug\lib - vcpkgpackages: openssl xerces-c - Debug32: - BuildPlatform: Win32 - BuildConfiguration: Debug - vcpkgarch: x86-windows - vcpkglibdir: debug\lib - vcpkgpackages: openssl xerces-c - variables: - VCPKG_ROOT: $(Build.SourcesDirectory)\vcpkg - XERCESC_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include - XERCESC_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir) - SSL_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include - SSL_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir) - steps: - - powershell: | - git clone -q --depth 1 git://github.com/Microsoft/vcpkg.git $(VCPKG_ROOT) - $(VCPKG_ROOT)\bootstrap-vcpkg.bat - $(VCPKG_ROOT)\vcpkg install --recurse --triplet $(vcpkgarch) $(vcpkgpackages) - displayName: Install additional packages using vcpkg - - powershell: | - git clone -q --depth 1 git://github.com/DOCGroup/ACE_TAO.git $(Build.SourcesDirectory)/ACE_TAO - git clone -q --depth 1 git://github.com/DOCGroup/DAnCE.git $(DAnCE_ROOT) - git clone -q --depth 1 git://github.com/DOCGroup/CIAO.git $(CIAO_ROOT) - displayName: git clone dependent repositories - - powershell: | - '#include "ace/config-win32.h"' > $(ACE_ROOT)\ace\config.h - displayName: Create config.h file - - powershell: | - echo "xerces3=1" | out-file -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features - echo "ssl=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features - echo "openssl11=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features - displayName: Create default.features file - - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type vs2019 $(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc -workers 4 - displayName: Run script mwc.pl on $(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc - - task: VSBuild@1 - displayName: Build solution $(CIAO_ROOT)/CIAO_TAO_DAnCE.sln - inputs: - solution: $(CIAO_ROOT)/CIAO_TAO_DAnCE.sln - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - maximumCpuCount: true - -- job: VisualStudio2017 - timeoutInMinutes: 90 - pool: - vmImage: vs2017-win2016 - strategy: - matrix: - Release64: - BuildPlatform: x64 - BuildConfiguration: Release - vcpkgarch: x64-windows - vcpkglibdir: lib - vcpkgpackages: openssl xerces-c - variables: - VCPKG_ROOT: $(Build.SourcesDirectory)\vcpkg - XERCESC_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include - XERCESC_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir) - SSL_INCDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\include - SSL_LIBDIR: $(VCPKG_ROOT)\installed\$(vcpkgarch)\$(vcpkglibdir) - steps: - - powershell: | - git clone -q --depth 1 git://github.com/Microsoft/vcpkg.git $(VCPKG_ROOT) - $(VCPKG_ROOT)\bootstrap-vcpkg.bat - $(VCPKG_ROOT)\vcpkg install --recurse --triplet $(vcpkgarch) $(vcpkgpackages) - displayName: Install additional packages using vcpkg - - powershell: | - git clone -q --depth 1 git://github.com/DOCGroup/ACE_TAO.git $(Build.SourcesDirectory)/ACE_TAO - git clone -q --depth 1 git://github.com/DOCGroup/DAnCE.git $(DAnCE_ROOT) - git clone -q --depth 1 git://github.com/DOCGroup/CIAO.git $(CIAO_ROOT) - displayName: git clone dependent repositories - - powershell: | - '#include "ace/config-win32.h"' > $(ACE_ROOT)\ace\config.h - displayName: Create config.h file - - powershell: | - echo "xerces3=1" | out-file -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features - echo "ssl=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features - echo "openssl11=1" | out-file -append -encoding ASCII $(ACE_ROOT)\bin\MakeProjectCreator\config\default.features - displayName: Create default.features file - - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type vs2017 $(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc -workers 4 - displayName: Run script mwc.pl on $(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc - - task: VSBuild@1 - displayName: Build solution $(CIAO_ROOT)/CIAO_TAO_DAnCE.sln - inputs: - solution: $(CIAO_ROOT)/CIAO_TAO_DAnCE.sln - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - maximumCpuCount: true - -- job: Linux - pool: - vmImage: ubuntu-latest - strategy: - matrix: - GCC9: - CC: gcc-9 - CXX: g++-9 - PackageDeps: g++-9 - platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU - steps: - - script: | - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - - sudo apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ $(Repo) main" - displayName: Add repository ($(Repo)) - condition: and(succeeded(), ne(variables['Repo'], '')) - - script: | - sudo apt-get --yes update - sudo apt-get --yes install libxerces-c-dev libssl-dev $(PackageDeps) - displayName: install system package dependencies ($(PackageDeps)) - - powershell: | - git clone -q --depth 1 git://github.com/DOCGroup/ACE_TAO.git $(Build.SourcesDirectory)/ACE_TAO - git clone -q --depth 1 git://github.com/DOCGroup/DAnCE.git $(DAnCE_ROOT) - git clone -q --depth 1 git://github.com/DOCGroup/CIAO.git $(CIAO_ROOT) - git clone -q --depth 1 git://github.com/objectcomputing/OpenDDS $(DDS_ROOT) - - powershell: | - '#include "ace/config-linux.h"' > $(ACE_ROOT)/ace/config.h - displayName: Create config.h file - - powershell: | - 'xerces3=1' > $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features - 'dds4ccm_opendds=1' >> $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features - 'dds_suppress_anys=0' >> $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features - 'ssl=1' >> $(ACE_ROOT)/bin/MakeProjectCreator/config/default.features - displayName: Create default.features file - - powershell: | - 'c++11=1' > $(ACE_ROOT)/include/makeinclude/platform_macros.GNU - 'xerces3=1' >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU - 'ssl=1' >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU - 'dds4ccm_opendds=1' >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU - "$(platform_file)" >> $(ACE_ROOT)/include/makeinclude/platform_macros.GNU - displayName: Create platform_macros file - - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type gnuace $(CIAO_ROOT)/CIAO_TAO_DAnCE_OpenDDS.mwc -workers 4 - displayName: Run mwc.pl on $(CIAO_ROOT)/CIAO_TAO_DAnCE_OpenDDS.mwc - - bash: make -j 6 -C $(CIAO_ROOT) - displayName: Build project - -- job: MacOSX - pool: - vmImage: macOS-latest - steps: - - powershell: | - git clone -q --depth 1 git://github.com/DOCGroup/ACE_TAO.git $(Build.SourcesDirectory)/ACE_TAO - git clone -q --depth 1 git://github.com/DOCGroup/CIAO.git $(CIAO_ROOT) - git clone -q --depth 1 git://github.com/DOCGroup/DAnCE.git $(DAnCE_ROOT) - - powershell: | - '#include "ace/config-macosx.h"' > $(ACE_ROOT)/ace/config.h - displayName: Create config.h file - - powershell: | - 'include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU' > $(ACE_ROOT)/include/makeinclude/platform_macros.GNU; - displayName: Create platform_macros file - - powershell: perl $(ACE_ROOT)/bin/mwc.pl -type gnuace $(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc -workers 4 - displayName: Run mwc.pl on $(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc - - bash: make -j 6 -C $(CIAO_ROOT) - displayName: Build project diff --git a/clone_build_tree.pl b/clone_build_tree.pl index a1e757bd..8a64a44c 100755 --- a/clone_build_tree.pl +++ b/clone_build_tree.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; @@ -269,7 +269,7 @@ sub symlinkFiles { } } - ## Remove links that point to non-existant files. The subroutine is + ## Remove links that point to non-existent files. The subroutine is ## now anonymous to avoid the "will not stay shared" warning for %dirs. my %dirs; File::Find::find({wanted => sub { @@ -334,7 +334,7 @@ sub hardlinkFiles { } } - ## Remove links that point to non-existant files + ## Remove links that point to non-existent files my $lfh = new FileHandle(); my $txt = "$fullbuild/clone_build_tree.links"; if (open($lfh, $txt)) { diff --git a/combine_dsw.pl b/combine_dsw.pl index d5b4d95c..e7324893 100755 --- a/combine_dsw.pl +++ b/combine_dsw.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; diff --git a/config/glib.mpb b/config/glib.mpb index c7192cc7..972f6083 100644 --- a/config/glib.mpb +++ b/config/glib.mpb @@ -10,9 +10,21 @@ project { lib } - includes += $(GLIB_ROOT)/include/glib-$(GLIB_VERSION) \ - $(GLIB_ROOT)/$(GLIB_LIB_DIR)/glib-$(GLIB_VERSION)/include libpaths += $(GLIB_ROOT)/lib lit_libs += glib-$(GLIB_VERSION) } + +feature(glib_versioned_includes) { + includes += $(GLIB_ROOT)/include/glib-$(GLIB_VERSION) \ + $(GLIB_ROOT)/$(GLIB_LIB_DIR)/glib-$(GLIB_VERSION)/include +} + +feature(!glib_versioned_includes) { + includes += $(GLIB_ROOT)/include + libpaths -= $(GLIB_ROOT)/lib + specific { + Debug::libpaths += $(GLIB_ROOT)/debug/lib + Release::libpaths += $(GLIB_ROOT)/lib + } +} diff --git a/config/nddslib.mpb b/config/nddslib.mpb index fb4dcc9a..475b13a7 100644 --- a/config/nddslib.mpb +++ b/config/nddslib.mpb @@ -6,7 +6,7 @@ project { includes += $(NDDSHOME)/include $(NDDSHOME)/include/ndds specific(prop:windows) { - macros += RTI_WIN32 NDDS_DLL_VARIABLE + macros += RTI_WIN32 NDDS_DLL_VARIABLE WIN32_LEAN_AND_MEAN } verbatim(gnuace, circuit) { @@ -23,7 +23,7 @@ project { FLAGS_C_CC += -DRTI_LINUX endif ifeq ($(ACE_PLATFORM_CONFIG),config-win32.h) - FLAGS_C_CC += -DRTI_WIN32 + FLAGS_C_CC += -DRTI_WIN32 -DWIN32_LEAN_AND_MEAN else FLAGS_C_CC += -DRTI_UNIX endif diff --git a/config/pin_base.mpb b/config/pin_base.mpb index 6d3f6c01..75e4e927 100644 --- a/config/pin_base.mpb +++ b/config/pin_base.mpb @@ -7,14 +7,15 @@ project { $(PIN_ROOT)/extras/components/include \ $(PIN_ROOT)/extras/crt/include - macros += BIGARRAY_MULTIPLIER=1 USING_XED + macros += BIGARRAY_MULTIPLIER=1 USING_XED PIN_CRT=1 __PIN__=1 + lit_libs += c-dynamic m-dynamic stlport-dynamic dl-dynamic unwind-dynamic specific (vc9) { runtime_library = 0 compile_flags += /Oy } - specific (vc10, vc11, vc12, vc14, vs2017, vs2019) { + specific (prop:microsoft) { runtime_library = MultiThreaded ImageHasSafeExceptionHandlers = false @@ -35,7 +36,8 @@ project { } specific (gnuace, make) { - compile_flags += -O3 -fomit-frame-pointer -fno-strict-aliasing -Wno-unknown-pragmas -fno-stack-protector -fPIC + compile_flags += -O3 -funwind-tables -fno-stack-protector -fasynchronous-unwind-tables -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -faligned-new -fPIC -nostdlib -fpermissive -Wno-error=all -fno-exceptions + compile_flags += '-isystem $(PIN_ROOT)/extras/stlport/include -isystem $(PIN_ROOT)/extras/libstdc++/include -isystem $(PIN_ROOT)/extras/crt/include -isystem $(PIN_ROOT)/extras/crt/include/kernel/uapi' compile_flags -= -Wunused-parameter libs += xed @@ -102,4 +104,9 @@ feature(intel64) { // DO NOT CHANGE ORDER lit_libs += libcpmt libcmt pinvm pin libxed ntdll-64 } + + specific (make, gnuace) { + compile_flags += -isystem $(PIN_ROOT)/extras/crt/include/arch-x86_64 -isystem $(PIN_ROOT)/extras/crt/include/kernel/asm-x86_64 + } + } diff --git a/config/pintool.mpb b/config/pintool.mpb index e6b4bc10..23229bc0 100644 --- a/config/pintool.mpb +++ b/config/pintool.mpb @@ -14,11 +14,11 @@ project : pin { verbatim (make, macros) { ifeq ($(shell uname -s), Darwin) CPPFLAGS += -DTARGET_MAC - LDFLAGS += -lpindwarf -lpinpthread -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp + LDFLAGS += -nostdlib -ldl-dynamic -lunwind-dynamic -lpin3dwarf -lpinpthread -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp LDFLAGS -= -lpthread else - CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv - LDLIBS += -lpindwarf + CPPFLAGS += -DTARGET_LINUX -fno-rtti -Wl,--hash-style=sysv + LDLIBS += -nostdlib -ldl-dynamic -lunwind-dynamic -lpin3dwarf LDFLAGS += -Wl,-Bsymbolic -Wl,--version-script=$(PIN_ROOT)/source/include/pin/pintool.ver endif } @@ -41,7 +41,7 @@ feature (ia32) { link_options += /ENTRY:Ptrace_DllMainCRTStartup@12 } - specific (vc10, vc11, vc12, vc14, vs2017, vs2019) { + specific (prop:microsoft) { EntryPointSymbol = Ptrace_DllMainCRTStartup@12 } } @@ -51,7 +51,12 @@ feature (intel64) { link_options += /ENTRY:Ptrace_DllMainCRTStartup } - specific (vc10, vc11, vc12, vc14, vs2017, vs2019) { + specific (prop:microsoft) { EntryPointSymbol = Ptrace_DllMainCRTStartup } + + specific (make, gnuace) { + compile_flags += $(PIN_ROOT)/intel64/runtime/pincrt/crtendS.o + libpaths += $(PIN_ROOT)/intel64/runtime/pincrt + } } diff --git a/config/winapp.mpb b/config/winapp.mpb index b87b3d42..cacbfb2f 100644 --- a/config/winapp.mpb +++ b/config/winapp.mpb @@ -1,11 +1,8 @@ // -*- MPC -*- project { - specific(em3, nmake, vc6) { + specific(nmake) { subsystem = windows } else { - subsystem = 2 - } - specific(vc10, vc11, vc12, vc14, vs2017, vs2019) { subsystem = Windows } } diff --git a/config/wireshark.mpb b/config/wireshark.mpb index 0a8c24ef..85d2d2b3 100644 --- a/config/wireshark.mpb +++ b/config/wireshark.mpb @@ -32,13 +32,16 @@ project : glib { specific(vs2019) { macros += MSC_VER_REQUIRED=1920 } + specific(vs2022) { + macros += MSC_VER_REQUIRED=1930 + } verbatim(nmake, top, 1) { include $(WIRESHARK_SRC)/config.nmake } } // Autoconf / In Source Wireshark Build Method -// This feasture works with how Wireshark Developers Guide says to build +// This feature works with how Wireshark Developers Guide says to build // Wireshark on Linux (autogen.sh). This is also used for older 1.x Wireshark // Windows builds and if Wireshark headers are installed on the system. // On Windows $(WIRETAP_VERSION) also has to be specified as well. diff --git a/config/xscdefaults.mpb b/config/xscdefaults.mpb index 70ce39d5..f55dedc8 100644 --- a/config/xscdefaults.mpb +++ b/config/xscdefaults.mpb @@ -1,19 +1,25 @@ // -*- MPC -*- project { - specific { - xsc_bin = $(XSC_ROOT)/bin/xsc - xsc_dep = $(XSC_ROOT)/bin/xsc - xsc_flags = --backend cxx - } + specific { + xsc_bin = $(XSC_ROOT)/bin/xsc + xsc_dep = $(XSC_ROOT)/bin/xsc + xsc_flags = --backend cxx + } - Define_Custom(XSC) { - automatic = 0 - dependent = $(XSC_DEP) - command = $(XSC_BIN) - commandflags = $(XSC_FLAGS) - inputext = .xsd - source_outputext = .cpp - header_outputext = .hpp - keyword xscflags = commandflags - } + verbatim(gnuace,macros,1) { + XSC_BIN = $(XSC_ROOT)/bin/xsc + XSC_DEP = $(XSC_ROOT)/bin/xsc$(EXEEXT) + XSC_FLAGS = --backend cxx + } + + Define_Custom(XSC) { + automatic = 0 + dependent = $(XSC_DEP) + command = $(XSC_BIN) + commandflags = $(XSC_FLAGS) + inputext = .xsd + source_outputext = .cpp + header_outputext = .hpp + keyword xscflags = commandflags + } } diff --git a/config/zlib.mpb b/config/zlib.mpb index af7711ac..731935a3 100644 --- a/config/zlib.mpb +++ b/config/zlib.mpb @@ -1,14 +1,21 @@ // -*- MPC -*- feature(zlib) { - includes += "$(ZLIB_ROOT)/include" - libpaths += "$(ZLIB_ROOT)/lib" + expand(ZLIB_INCDIR) { + $ZLIB_INCDIR + $(ZLIB_ROOT)/include + } + expand(ZLIB_LIBDIR) { + $ZLIB_LIBDIR + $(ZLIB_ROOT)/lib + } + + includes += "$(ZLIB_INCDIR)" + libpaths += "$(ZLIB_LIBDIR)" macros += ZLIB - // @@ Notice: If you are building with Cygwin, you may need to manually - // change the following library to zlib. specific(prop:windows) { - zlibname = zlib - lit_libs += $(ZLIBNAME) + Debug::lit_libs += zlibd + Release::lit_libs += zlib } else { lit_libs += z } diff --git a/create_base.pl b/create_base.pl index 8991f173..a87c0199 100755 --- a/create_base.pl +++ b/create_base.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; @@ -150,7 +150,7 @@ sub usageAndExit { "directory>\n\nThis script will create a base project ", "based on the contents of the\nsupplied MPC file. ", "This is only useful if the project ", - "explictly sets\nsharedname or staticname.\n"; + "explicitly sets\nsharedname or staticname.\n"; exit(0); } @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; diff --git a/devtools/document_template.pl b/devtools/document_template.pl index ffbdcbfd..66f5aa7e 100755 --- a/devtools/document_template.pl +++ b/devtools/document_template.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; diff --git a/devtools/highlight_template.pl b/devtools/highlight_template.pl index 8a94bcb7..e165371e 100755 --- a/devtools/highlight_template.pl +++ b/devtools/highlight_template.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; @@ -25,8 +25,9 @@ Usage: mwc.pl [-global <file>] [-include <directory>] [-recurse] [-language <cplusplus | csharp | java | vb>] [-type <automake | bcb2007 | bcb2009 | bds4 | bmake | cc | cdt6 | cdt7 | em3 | ghs | html | iar | make | nmake | rpmspec | - sle | uvis | vc6 | vc7 | vc8 | vc9 | vc10 | vc11 | vc12 | - vc14 | vs2017 | vs2019 | vc71 | wb26 | wb30 | wix>] + sle | uvis | vc6 | vc7 | vc71 | vc8 | vc9 | vc10 | vc11 | + vc12 | vc14 | vs2017 | vs2019 | vs2022 | wb26 | wb30 | + wix>] [files] -base Add <project> as a base project to each generated diff --git a/docs/html/MakeProjectCreator.html b/docs/html/MakeProjectCreator.html index e27f5ba6..6e59a72b 100644 --- a/docs/html/MakeProjectCreator.html +++ b/docs/html/MakeProjectCreator.html @@ -530,6 +530,18 @@ <tr> <td rowspan="1" colspan="1"> <p class="TblCode"> + <em class="TableCode">vs2022</em> + </p> + </td> + + <td rowspan="1" colspan="1"> + <p class="Tbl-Body">Visual Studio 2022.</p> + </td> + </tr> + + <tr> + <td rowspan="1" colspan="1"> + <p class="TblCode"> <em class="TableCode"> <a href="WB26.html"> wb26 @@ -1838,7 +1850,7 @@ class="XRef">the -workers_port option</a>, "Code">vc7</em>, <em class="Code">vc71</em>, <em class="Code">vc8</em>, <em class="Code">vc9</em>, <em class="Code">vc10</em>, <em class="Code">vc11</em>, <em class="Code">vc12</em>, <em class="Code">vc14</em>, - <em class="Code">vs2017</em>, and <em class="Code">vs2019</em> project types. If this environment + and <em class="Code">vs*</em> project types. If this environment variable is set, MPC will generate inter-project dependencies for libraries within a single workspace. This is usually not desired since adding these dependencies in a static workspace has the side @@ -1994,7 +2006,7 @@ class="XRef">the -workers_port option</a>, <p class="Code"> exclude(vc6, vc7, vc71, vc8, vc9, - vc10, vc11, vc12, vc14, vs2017, vs2019, nmake) { + vc10, vc11, vc12, vc14, vs2017, vs2019, vs2022, nmake) { </p> <p class="Code"> this_directory</p> @@ -2603,7 +2615,7 @@ class="Code">specific</em> clause. <em class="Code">vc10</em>, <em class="Code">vc11</em>, <em class="Code">vc12</em>, <em class="Code">vc14</em>, <em class="Code">vc12</em>, <em class="Code">vc14</em>, - <em class="Code">vs2017</em>, and <em class="Code">vs2019</em> project types. + and <em class="Code">vs*</em> project types. </p> </td> </tr> @@ -3250,7 +3262,7 @@ class="Code">specific</em> clause. "Code">vc7</em>, <em class="Code">vc71</em>, <em class="Code">vc8</em>, <em class="Code">vc9</em>, <em class="Code">vc10</em>, <em class="Code">vc11</em>, <em class="Code">vc12</em>, <em class="Code">vc14</em>, - <em class="Code">vs2017</em>, and <em class="Code">vs2019</em> project types. + and <em class="Code">vs*</em> project types. </p> <p class="Body"> @@ -5815,7 +5827,7 @@ class="Code">specific</em> clause. A project and platform non-specific command separator which always runs right-hand side of the command. For example, in the - following psuedo commmand string, both the <em class= + following pseudo command string, both the <em class= "Code"><%cat%></em> and <em class= "Code"><%mv%></em> commands would be run. <em class="Code"> @@ -8110,7 +8122,7 @@ class="Code">specific</em> clause. 7.10 is return for vc71 and 8.00 is returned for vc8, 9.00 is returned for vc9, 10.00 is returned for vc10, 11.00 is returned for vc11, 12.0 is returned for vc12, - 14.0 is returned for vc14, 14.1 is returned for vs2017, 14.2 is returned for vs2019. + 14.0 is returned for vc14, 14.1 is returned for vs2017, 14.2 is returned for vs2019, 14.3 is returned for vs2022. </p> </td> </tr> @@ -8428,7 +8440,7 @@ class="Code">specific</em> clause. <p class="Body"> Certain project types don't support the same input file used by multiple custom types (current examples of - this are vc10, vc11, vc12, vc14, vs2017, vs2019, cdt6, and cdt7). To accommodate these types, MPC + this are vc10, vc11, vc12, vc14, vs*, cdt6, and cdt7). To accommodate these types, MPC has a capability called "combined custom". With this capability enabled in the specific ProjectCreator, MPC will "fold together" the multiple custom steps so that the target tool (Visual Studio @@ -8439,7 +8451,7 @@ class="Code">specific</em> clause. non-empty. If it isn't empty, the values in it can be iterated over with a <em class="Code"><%foreach%></em>. During that iteration, the following values can be obtained by the template. - Each one would appear in the template preceeded by + Each one would appear in the template preceded by <em class="Code">custom_type->input_file-></em> </p> diff --git a/generate_export_header.pl b/generate_export_header.pl index 8338330a..2f6c3ae2 100755 --- a/generate_export_header.pl +++ b/generate_export_header.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; diff --git a/modules/Depgen/Preprocessor.pm b/modules/Depgen/Preprocessor.pm index 4c8d4a48..dc9de901 100644 --- a/modules/Depgen/Preprocessor.pm +++ b/modules/Depgen/Preprocessor.pm @@ -123,7 +123,7 @@ sub process { } ## This has to be outside the if (open(... - ## If the last file to be processed isn't accessable then + ## If the last file to be processed isn't accessible then ## we still need to return the array reference of includes. if (!$noincs) { my @files = ($file); diff --git a/modules/OutputMessage.pm b/modules/OutputMessage.pm index f37b84fc..31ea320a 100644 --- a/modules/OutputMessage.pm +++ b/modules/OutputMessage.pm @@ -49,7 +49,7 @@ sub set_levels { } } -## Accessor for the debug setting. No parameters are necesary. +## Accessor for the debug setting. No parameters are necessary. sub get_debug_level { return $debug; } diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index f4977a65..87de6547 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -4306,7 +4306,7 @@ sub convert_command_parameters { } ## Check for the gendir setting associated with this input file. We - ## have to check at so many levels so we don't inadvertantly create + ## have to check at so many levels so we don't inadvertently create ## intermediate hash tables. if (defined $self->{'flag_overrides'}->{$ktype} && defined $self->{'flag_overrides'}->{$ktype}->{$input} && diff --git a/modules/StringProcessor.pm b/modules/StringProcessor.pm index 9544f2bb..f6da1934 100644 --- a/modules/StringProcessor.pm +++ b/modules/StringProcessor.pm @@ -117,7 +117,7 @@ sub crlf { sub windows_crlf { ## Windows and cygwin require a carriage return and line feed. ## However, at some point cygwin changed the way it does output and can - ## be controled through an environment variable. + ## be controlled through an environment variable. return ($^O eq 'MSWin32' || ($^O eq 'cygwin' && ($] < 5.008 || (defined $ENV{PERLIO} && $ENV{PERLIO} eq 'crlf'))) ? diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm index 0544f5d7..f447b175 100644 --- a/modules/TemplateParser.pm +++ b/modules/TemplateParser.pm @@ -475,6 +475,17 @@ sub get_value_with_default { return (UNIVERSAL::isa($value, 'ARRAY') ? "@$value" : $value); } +sub get_match_pattern { + my ($tp, $patarg) = @_; + + my $patval = $tp->get_value($patarg); + if (defined $patval) { + return $patval; + } + else { + return $patarg; + } +} sub process_foreach { my $self = shift; @@ -930,6 +941,7 @@ sub doif_contains { if (defined $val) { my($name, $pattern) = $self->split_parameters("@$val"); if (defined $name && defined $pattern) { + $pattern = $self->get_match_pattern ($pattern); return ($self->get_value_with_default($name) =~ /$pattern/); } } diff --git a/modules/VS2022ProjectCreator.pm b/modules/VS2022ProjectCreator.pm new file mode 100644 index 00000000..2f9ce191 --- /dev/null +++ b/modules/VS2022ProjectCreator.pm @@ -0,0 +1,56 @@ +package VS2022ProjectCreator; + +# ************************************************************ +# Description : vs2022 (Visual Studio 2022) Project Creator +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use VC12ProjectCreator; + +use vars qw(@ISA); +@ISA = qw(VC12ProjectCreator); + +## NOTE: We call the constant as a function to support Perl 5.6. +my %info = (Creator::cplusplus() => {'ext' => '.vcxproj', + 'dllexe' => 'vs2022exe', + 'libexe' => 'vs2022libexe', + 'dll' => 'vs2022dll', + 'lib' => 'vs2022lib', + 'template' => [ 'vc10', 'vc10filters' ], + }, + ); + +my %config = ('vcversion' => '16.00', + 'toolsversion' => '16.0', + ); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub get_info_hash { + my($self, $key) = @_; + + ## If we have the setting in our information map, then use it. + return $info{$key} if (defined $info{$key}); + + ## Otherwise, see if our parent type can take care of it. + return $self->SUPER::get_info_hash($key); +} + +sub get_configurable { + my($self, $name) = @_; + + ## If we have the setting in our config map, then use it. + return $config{$name} if (defined $config{$name}); + + ## Otherwise, see if our parent type can take care of it. + return $self->SUPER::get_configurable($name); +} + +1; diff --git a/modules/VS2022WorkspaceCreator.pm b/modules/VS2022WorkspaceCreator.pm new file mode 100644 index 00000000..39393912 --- /dev/null +++ b/modules/VS2022WorkspaceCreator.pm @@ -0,0 +1,39 @@ +package VS2022WorkspaceCreator; + +# ************************************************************ +# Description : vs2022 (Visual Studio 2022) Workspace Creator +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use VS2022ProjectCreator; +use VC12WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(VC12WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub pre_workspace { + my($self, $fh) = @_; + my $crlf = $self->crlf(); + + print $fh '', $crlf, + 'Microsoft Visual Studio Solution File, Format Version 12.00', $crlf; + $self->print_workspace_comment($fh, + '# Visual Studio 17', $crlf, + '#', $crlf, + '# This file was generated by MPC. Any changes made directly to', $crlf, + '# this file will be lost the next time it is generated.', $crlf, + '#', $crlf, + '# MPC Command:', $crlf, + '# ', $self->create_command_line_string($0, @ARGV), $crlf); +} + +1; diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index f41f6520..b6be9879 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -1352,7 +1352,7 @@ sub generate_hierarchy { } elsif ($top ne $current) { if ($current ne '.') { - ## Write out the hierachical workspace + ## Write out the hierarchical workspace $self->cd($current); ($status, $errorString) = $self->generate_hierarchy($creator, \@saved, \%sinfo); @@ -1535,7 +1535,7 @@ sub generate_project_files { } - ## Add implict project dependencies based on source files + ## Add implicit project dependencies based on source files ## that have been used by multiple projects. If we do it here ## before we call generate_hierarchy(), we don't have to call it ## in generate_hierarchy() for each workspace. @@ -1846,7 +1846,7 @@ sub generate_project_files_fork { } } - ## Add implict project dependencies based on source files + ## Add implicit project dependencies based on source files ## that have been used by multiple projects. If we do it here ## before we call generate_hierarchy(), we don't have to call it ## in generate_hierarchy() for each workspace. @@ -2269,7 +2269,7 @@ sub generate_project_files_fork_socket { } } - ## Add implict project dependencies based on source files + ## Add implicit project dependencies based on source files ## that have been used by multiple projects. If we do it here ## before we call generate_hierarchy(), we don't have to call it ## in generate_hierarchy() for each workspace. @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; diff --git a/prj_install.pl b/prj_install.pl index 9bcb23ac..4d7d4002 100755 --- a/prj_install.pl +++ b/prj_install.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; @@ -469,7 +469,7 @@ for(my $i = 0; $i <= $#ARGV; ++$i) { } } else { - usageAndExit('Unkown option: ' . $arg); + usageAndExit('Unknown option: ' . $arg); } } elsif (!defined $insdir) { diff --git a/registry.pl b/registry.pl index d221b1bd..800c4445 100755 --- a/registry.pl +++ b/registry.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; @@ -38,6 +38,7 @@ my %types = ('nmake' => ['NMAKE', 'NMAKE'], 'vc14' => ['SLN 14.0', 'VCPROJ 14.0'], 'vs2017' => ['SLN 2017', 'PROJ 2017'], 'vs2019' => ['SLN 2019', 'PROJ 2019'], + 'vs2022' => ['SLN 2022', 'PROJ 2022'], 'wix' => ['WiX', 'WiX Project'], ); diff --git a/templates/bmake.mpd b/templates/bmake.mpd index 9491dee9..d78bddb1 100644 --- a/templates/bmake.mpd +++ b/templates/bmake.mpd @@ -9,7 +9,7 @@ <%foreach(configurations)%> !ifdef <%normalize(uc(configuration))%> OCFLAGS32 = <%if(optimize)%>-O1<%else%><%if(debug_prj)%>-v -y -Od -vi- -k<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%> -OCFLAGS32C = <%if(optimize)%>-O1<%else%><%if(debug_prj)%>-Od -vi- <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%> +OCFLAGS32C = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-Od -vi- <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%> OCFLAGS64 = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-g -O0 <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%> CFG_DIR = <%intermediate_dir%>\\ LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%> diff --git a/templates/bmakecommon.mpt b/templates/bmakecommon.mpt index 109925b0..a2b8ddab 100644 --- a/templates/bmakecommon.mpt +++ b/templates/bmakecommon.mpt @@ -38,10 +38,10 @@ link64 = ilink64 tlib32 = tlib tlib64 = tlib64 thrflags32 = -tWM -thrflags32c = -tWM +thrflags32c = -tM thrflags64 = -tM binaryflags32 = -tWR -tWD -binaryflags32c = -tWR -tWD +binaryflags32c = -tR -tD binaryflags64 = -tR -tD dllflags = -Tpd -Gi -x -Gn -w-dup libflags = /C diff --git a/templates/vs2022dll.mpt b/templates/vs2022dll.mpt new file mode 100644 index 00000000..bc918721 --- /dev/null +++ b/templates/vs2022dll.mpt @@ -0,0 +1,4 @@ +// -*- MPC -*- +conditional_include "vs2022platforms" +conditional_include "vc1xdll" +conditional_include "user_vs2022dll" diff --git a/templates/vs2022exe.mpt b/templates/vs2022exe.mpt new file mode 100644 index 00000000..cc2bbc24 --- /dev/null +++ b/templates/vs2022exe.mpt @@ -0,0 +1,4 @@ +// -*- MPC -*- +conditional_include "vs2022platforms" +conditional_include "vc1xexe" +conditional_include "user_vs2022exe" diff --git a/templates/vs2022lib.mpt b/templates/vs2022lib.mpt new file mode 100644 index 00000000..29fcdcd9 --- /dev/null +++ b/templates/vs2022lib.mpt @@ -0,0 +1,4 @@ +// -*- MPC -*- +conditional_include "vs2022platforms" +conditional_include "vc1xlib" +conditional_include "user_vs2022lib" diff --git a/templates/vs2022libexe.mpt b/templates/vs2022libexe.mpt new file mode 100644 index 00000000..8f347b3e --- /dev/null +++ b/templates/vs2022libexe.mpt @@ -0,0 +1,4 @@ +// -*- MPC -*- +conditional_include "vs2022platforms" +conditional_include "vc1xlibexe" +conditional_include "user_vs2022libexe" diff --git a/templates/vs2022platforms.mpt b/templates/vs2022platforms.mpt new file mode 100644 index 00000000..6e08c088 --- /dev/null +++ b/templates/vs2022platforms.mpt @@ -0,0 +1,38 @@ +// -*- MPC -*- +// +// Any of these platforms can set using value_template platforms= +// when generating solutions/projects. +// + +platforms = Win32 x64 ARM ARM64 +default_platform = x64 +PlatformToolset = v143 +WindowsTargetPlatformVersion = 10.0 + +Win32 { + output_subdir = I386 +} + +x64 { + output_subdir = AMD64 + cpu_defines = _AMD64_ + platform_defines = _WIN64 + TargetMachine = "0" // We let VC++ figure it out for us. + link_options = /machine:AMD64 +} + +ARM { + output_subdir = ARM + cpu_defines = _ARM_ + platform_defines = _ARM + TargetMachine = "0" // We let VC++ figure it out for us. + link_options = /machine:ARM +} + +ARM64 { + output_subdir = ARM64 + cpu_defines = _ARM64_ + platform_defines = _ARM64 + TargetMachine = "0" // We let VC++ figure it out for us. + link_options = /machine:ARM64 +} diff --git a/vs_postclean.pl b/vs_postclean.pl index 4f44809e..2b0adfa6 100755 --- a/vs_postclean.pl +++ b/vs_postclean.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' & eval 'exec perl -w -S $0 $argv:q' if 0; |