Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable language extension feature for certain files in premake5 #2421

Open
roops123 opened this issue Jan 17, 2025 · 1 comment
Open

Disable language extension feature for certain files in premake5 #2421

roops123 opened this issue Jan 17, 2025 · 1 comment
Labels

Comments

@roops123
Copy link

Hii folks, I am new to premake. I want to know how to add disable language extension for certain files.

This is what I required:

    ```
<ClCompile Include="folder_path\ABC.c">
      <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions>
      <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions>
      <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions>
      <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions>
    </ClCompile>

I am able to set project configuration, but I am not able to change individual file configuration in premake script.
@nickclark2016
Copy link
Member

We don't have this functionality built directly in Premake, but you should be able to use something like:

filter "files:ABC.c"
  buildoptions { "/Za" }
filter ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants