Skip to content

Commit

Permalink
Add CompileAsC build (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSDN-WhiteKnight authored Jul 9, 2022
1 parent 7fd1724 commit fff414e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci-c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ErrLib CompileAsC

on:
push:
branches:
- master
pull_request:

jobs:
ci:

runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- name: Build with MSBuild
run: |
$Env:Path += ";${Env:ProgramFiles}\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"; msbuild ErrLib\ErrLib.vcxproj -p:ErrLibCompilationMode=CompileAsC
- name: Archive build results
uses: actions/upload-artifact@v1
with:
name: Output
path: ErrLib/Debug/
5 changes: 5 additions & 0 deletions ErrLib/ErrLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ProjectGuid>{2660AD30-6A0E-46CD-8838-668DAB3080EC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>ErrLib</RootNamespace>
<ErrLibCompilationMode>Default</ErrLibCompilationMode>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(VisualStudioVersion)'=='11.0'">
Expand Down Expand Up @@ -86,6 +87,7 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ERRLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>$(ErrLibCompilationMode)</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand All @@ -101,6 +103,7 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ERRLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>$(ErrLibCompilationMode)</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>DEBUG;ARCHITECTURE_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand All @@ -118,6 +121,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ERRLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>$(ErrLibCompilationMode)</CompileAs>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -134,6 +138,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ERRLIB_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>$(ErrLibCompilationMode)</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>ARCHITECTURE_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down

0 comments on commit fff414e

Please sign in to comment.