pan></code></a>, use absolute paths in generator
expressions to ensure the sources are correctly assigned to the target.</p>
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="c"># WRONG: starts with generator expression, but relative path used</span>
<span class="nf">target_sources(</span><span class="nb">MyTarget</span><span class="w"> </span><span class="s">&quot;$&lt;$&lt;CONFIG:Debug&gt;:dbgsrc.cpp&gt;&quot;</span><span class="nf">)</span><span class="w"></sp