开发者

Adding a Compiler PreprocessorDefinitions in VS2010 C++ based on the value of %(Link->SubSystem)

开发者 https://www.devze.com 2023-01-30 15:13 出处:网络
I would have expected the following snippet of msbuild to work at the bottom of my .vcxproj files: <ItemDefinitionGroup>

I would have expected the following snippet of msbuild to work at the bottom of my .vcxproj files:


 <ItemDefinitionGroup>
   <ClCompile>
<PreprocessorDefinitions Condition='%(Link.SubSystem)'=='Windows'>SomethingWinSpecific;%(PreprocessorDefinitions)
   </ClCompile>
  </ItemDefinitionGroup>

except no matter what I do %(Link.SubSystem) is empty. I even printed out its value in various targets throughout a build and it appears to remain empty until the Link step begins. So my question is开发者_Go百科, is there any way to access the value of Link.SubSystem before the Compile step?


Link.SubSystem distinquishes between a Windows app and Console App, so Platform will not work.

0

精彩评论

暂无评论...
验证码 换一张
取 消