<div dir="ltr">Hi,<div><br></div><div>your problem has two natures. From the terminal you're most probably using the "Unix Makefiles" generator. For xcode it's a multi-configuration generator that adds the build configuration to the path. Now, about CLion... it seems to run CMake by itself in a directory of it's choice. You'll have a hard time with it.</div><div><br></div><div>> is there a way to make these filenames consistent so that I when I try to load some resources my code doesn't break?</div><div><br></div><div>Easily - use relative paths in your code and make sure you set the right working directory when running.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 August 2015 at 11:42, Owen Alanzo Hogarth <span dir="ltr"><<a href="mailto:gurenchan@gmail.com" target="_blank">gurenchan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am having a bit of trouble getting this sorted out.<div><br></div><div>I set</div><div><div>set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)<br></div></div><div><br></div><div>in one of my cmakelists.txt file and it works almost as expected. If I use the terminal to build everything goes where it needs to and then I can reference the relative location of my files and folders from my c code BUT</div><div><br></div><div>if I use xcode to build the same program, xcode seems to append a Debug or Release to the end of my path breaking all my c code.</div><div><br></div><div>sample output below</div><div><div>//    terminal</div><div>//    /Users/user/FOLDER/project/build/bin/</div><div>//    /Users/user/FOLDER/project/build/bin/resources/</div></div><div><br></div><div><div>//    xcode</div><div>//    /Users/user/FOLDER/project/build/bin/Debug/</div><div>//    /Users/user/FOLDER/project/build/bin/Debug/resources/</div><div><br></div><div>//   clion </div><div>//    /ad053ed7/ad053ed7/Debug/bin/</div><div>//    /ad053ed7/ad053ed7/Debug/bin/resources/</div></div><div><br></div><div>As you can see I am getting three different outputs based on the same cmake file using 3 ways of building.</div><div><br></div><div>is there a way to make these filenames consistent so that I when I try to load some resources my code doesn't break?</div></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Pozdrowienia<br>Jakub Zakrzewski</div>
</div>