Skip to content

Commit

Permalink
VS build (#347)
Browse files Browse the repository at this point in the history
* Mingw support

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>

* mkdirc

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>

* Added circleci build for mingw

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>

* build VS project

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>

---------

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Co-authored-by: Michal Princ <michal.princ@nxp.com>
  • Loading branch information
Hadatko and MichalPrincNXP authored Mar 7, 2023
1 parent 8f77dad commit 11f2a0a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
25 changes: 19 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- checkout
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh clang
- run: chmod u+x run_tests.sh && ./run_tests.sh clang
- store_artifacts:
path: ./Release/Linux/erpcgen/erpcgen
# - store_artifacts:
# path: ./Release/Linux/erpcgen/erpcgen
build-mac-gcc:
macos:
xcode: 12.5.1 # https://circleci.com/docs/using-macos/#supported-xcode-versions https://en.wikipedia.org/wiki/MacOS_version_history#Releases
Expand All @@ -40,8 +40,8 @@ jobs:
- checkout
- run: chmod u+x install_dependencies.sh && ./install_dependencies.sh clang
- run: chmod u+x run_tests.sh && ./run_tests.sh clang
- store_artifacts:
path: ./Release/Darwin/erpcgen/erpcgen
# - store_artifacts:
# path: ./Release/Darwin/erpcgen/erpcgen
build-windows-mingw:
executor:
name: win/default
Expand All @@ -50,9 +50,21 @@ jobs:
- checkout
- run: powershell.exe .\install_dependencies.ps1
- run: powershell.exe .\mingw64\bin\mingw32-make erpcgen
# - store_artifacts:
# path: ./Release/MINGW64/erpcgen/erpcgen.exe
build-windows-VS:
executor:
name: win/default
size: large
steps:
- checkout
- run:
name: Install VS buuildtools
no_output_timeout: 60m
command: powershell.exe .\install_dependencies.ps1 VS
- run: powershell.exe "& 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' .\erpcgen\VisualStudio_v14\erpcgen.sln /property:Configuration=Release"
- store_artifacts:
path: ./Release/MINGW64/erpcgen/erpcgen.exe

path: ./erpcgen/VisualStudio_v14/Release/erpcgen.exe
workflows:
build-workflow:
jobs:
Expand All @@ -61,3 +73,4 @@ workflows:
- build-mac-gcc
- build-mac-clang
- build-windows-mingw
- build-windows-VS
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ boost.7z
boost*/
mingw.7z
mingw64/
vs_BuildTools*
4 changes: 0 additions & 4 deletions erpcgen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ ifeq "$(build)" "release"
endif
endif

ifeq "$(is_mingw)" "1"
CXXFLAGS += -DBOOST_FILESYSTEM_VERSION=4
endif

# Run flex
$(OBJS_ROOT)/erpcgen_lexer.cpp: $(ERPC_ROOT)/erpcgen/src/erpcgen_lexer.l $(OBJS_ROOT)/erpcgen_parser.tab.hpp | $(OBJECTS_DIRS)
@$(call printmessage,orange,Generating, $(subst $(ERPC_ROOT)/,,$<))
Expand Down
7 changes: 5 additions & 2 deletions install_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ Set-Location "..\..\"

if ($args[0] -eq "VS")
{
# winget install --id=Microsoft.VisualStudio.2019.BuildTools -e
# & 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' .\erpcgen\VisualStudio_v14\erpcgen.sln /property:Configuration=Release
$URLBuildtools="https://download.visualstudio.microsoft.com/download/pr/33d686db-3937-4a19-bb3c-be031c5d69bf/66d85abf1020496b07c59aba176def5127352f2fbdd3c4c4143738ab7dfcb459/vs_BuildTools.exe"
$PathBuildtools="vs_BuildTools.exe"
Remove-Item -ErrorAction Ignore $PathBuildtools
Invoke-WebRequest -URI $URLBuildtools -OutFile $PathBuildtools
Start-Process $PathBuildtools -ArgumentList "--quiet --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --wait" -Wait
}
else
{
Expand Down

0 comments on commit 11f2a0a

Please sign in to comment.