premake / premake-core

Premake
https://premake.github.io/
BSD 3-Clause "New" or "Revised" License
3.2k stars 618 forks source link

how to set /Zc:__cplusplus command line in premake5? #2163

Closed Intervel closed 10 months ago

Intervel commented 10 months ago

hello guys! im still new at premake5, how to set /Zc:__cplusplus command line? 1 2

i want to set /Zc:__cplusplus. how to do that?

nickclark2016 commented 10 months ago

You can pass build options, like so:

buildoptions { "/Zc:__cplusplus" }
Jarod42 commented 10 months ago

Even better, protect it with correct filter:

filter "toolset:msc*"
  buildoptions { "/Zc:__cplusplus" }
filter {} -- reset filter