Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4,165
    • Issues 4,165
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Merge requests
  • !7373

VS: Add compile properties to .NET Sdk projects

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Maxime Raynaud requested to merge mraynaud/cmake:23376-add-compile-properties-to-csharp-sdk-projects into master Jun 15, 2022
  • Overview 4
  • Commits 1
  • Pipelines 1
  • Changes 4

This change adds csharp compile properties to the "Configuration" part of a Sdk-style csproj generation by propagating flags gathered in clOptions. It adds DefineConstants that was needed to support target_compile_definitions.

Before

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <OutputPath>path\to\objdir</OutputPath>
</PropertyGroup>

After

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <OutputPath>path\to\objdir</OutputPath>
    <DebugType>full</DebugType>
    <DefineConstants>DEBUG;ADEFINITION</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <LangVersion>10</LangVersion>
    <Optimize>false</Optimize>
    <WarningLevel>3</WarningLevel>
  </PropertyGroup>

Closes: #23376 (closed)
Issue: #23190

Edited Jun 15, 2022 by Brad King
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 23376-add-compile-properties-to-csharp-sdk-projects