I don&#39;t see a way to join or normalize paths in CMake. For example, there is a &quot;base path&quot; that the user can specify in a cache variable, like so:<div><br></div><div>BASE_PATH = &quot;T:/stuff/&quot;</div><div>
<br></div><div>Later in my CMake script, I join a subpath to it like so:</div><div><br></div><div>&quot;${BASE_PATH}/morestuff&quot;</div><div><br></div><div>The problem is, this becomes:</div><div><br></div><div>&quot;T:/stuff//morestuff&quot;</div>
<div><br></div><div>Notice the double slash. Also if the user specifies backslashes in the variable, you get this:</div><div><br></div><div>&quot;T:\stuff\/morestuff&quot;</div><div><br></div><div>Normalization would be ideal here, or a way to properly join the paths like so:</div>
<div><br></div><div>path( JOIN &quot;${BASE_PATH}&quot; &quot;morestuff&quot; )</div><div><br></div><div>Which would yield the cmake path:</div><div><br></div><div>&quot;T:/stuff/morestuff&quot;</div><div><br></div><div>Is any of this possible? How do I work around this?</div>
<div><div><br></div><div>---------</div>Robert Dailey<br>
</div>