[CMake] how to place all executables in /build/bin directory

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Tue Mar 22 18:33:42 EDT 2011


Hi Arvind,

As documented here<http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:CMAKE_RUNTIME_OUTPUT_DIRECTORY>,
set the variable CMAKE_RUNTIME_OUTPUT_DIRECTORY instead.

Usually I set this one just after I invoke PROJECT() command.

Indeed, as specified
here<http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:EXECUTABLE_OUTPUT_PATH>,
EXECUTABLE_OUTPUT_PATH has been deprecated since cmake 2.6.

Jc

On Tue, Mar 22, 2011 at 6:12 PM, Arvind Rao <arvind.sbia at gmail.com> wrote:

> Hi All,
>
> I have what should be a simple issue. I have successfully built a project
> using CMAKE(out of source build). The executables are all placed in the
> Project/build/Exec. But I want them placed in Project/build/bin/ instead.
> Toward this end, I set the EXECUTABLE_OUTPUT_PATH, in the top-level
> CMakeList file, like so:
>
> cmake_minimum_required(VERSION 2.6)
> project(EXAMPLE)
>
> set(CMAKE_CXX_FLAGS "-Wall")
> add_subdirectory(Exec)
>
> set( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )
>
> The result is that the executables are all placed in /Project/build/Exec,
> whether Project/build/bin exists or not. Does anyone have ideas?
>
> Best wishes,
> Arvind
>
> _______________________________________________
> 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
>



-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110322/9e5980c8/attachment.htm>


More information about the CMake mailing list