Sorry, meant to keep this on the list. - Ben ---------- Forwarded message ---------- From: Ben Medina <ben.med...@gmail.com> Date: Mon, Aug 9, 2010 at 12:45 PM Subject: Re: [CMake] Eliminate Debug/Release directories and name executables based on configuration To: James Ihrig <jeih...@gmail.com>
I believe this is what the DEBUG_POSTFIX property is for: set_target_properties (demo PROPERTIES DEBUG_POSTFIX _d) - Ben On Mon, Aug 9, 2010 at 11:23 AM, James Ihrig <jeih...@gmail.com> wrote: > Hello, > I'm using CMake for Visual Studio as well as Makefiles for Linux. In > windows, debug and release directories seem to be added for the executables. > I actually would like to do three things: > 1) Test for a debug or release build > 2) Name the executable created based on it's build. (myProgram_d.exe for > debug, myProgram.exe for release.) > 3) Place the output executables into the bin directory without debug and > release directories. > I have not found a way to test for the build type but I have tried these > together, and in various combinations: > set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../Demo/bin) > set(RUNTIME_OUTPUT_BINARY ${PROJECT_BINARY_DIR}/../Demo/bin) > set(RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/../Demo/bin) > set(RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/../Demo/bin) > set(RUNTIME_OUTPUT_NAME_DEBUG demo_d.exe) > set(RUNTIME_OUTPUT_NAME_RELEASE demo.exe) > The closest I can come are these executables: > Demo\bin\Debug\helloDemo.exe > Demo\bin\Release\helloDemo.exe > What I want is: > Demo\bin\demo_d.exe > Demo\bin\demo.exe > Any help or suggestions would be greatly appreciated! > -Jim > > P.S. > For anyone curious what my main CMakeLists.txt looks like, here it is: > http://codepad.org/Yuev7TWJ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake