an>

<span class="c"># CORRECT: absolute path used inside the generator expression</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;:${CMAKE_CURRENT_SOURCE_DIR}/dbgsrc.cpp&gt;&quot;</span><span class="nf">)</span><span class="w"></span>
</pre></div>
</div>
<p>See the <span class="target" id="index-0-manual:cmake-buildsystem(7)"></span><a class="reference internal" href="../manual/cmake-buildsystem.7.html#man