premake / premake/premake-core

CMake generator expression equivalent?

Open
#1,891 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

Hi all,

I have this command here that I want to run in a build rule

vendor/shader-compiling/fxc.exe /nologo /Emain /Tvs_5_0 /Od /Zi /Fo assets/shaders/hlsl/%(Filename)_vs.cso /Fd %{cfg.buildtarget.directory}/%(Filename)_vs.pdb assets/shaders/hlsl/%(Filename)_vs.hlsl

and in release mode I want to not include the /Od option. In CMake I would use a generator expression: $<$<CONFIG:Debug>:/Od>

How would I achieve the same thing in premake?

Thanks in advance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides a build-rule command and a CMake generator expression but names no Premake file, test, or entry point. Start by checking the project's documented build-rule and configuration-filter syntax; done would be a confirmed, documented way to omit /Od outside Debug builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.