This is going to sound either harsh or "flame bait" but is written in all 
seriousness and with a lot of practical experience.

  When coming from a "makefile" based system like Unix and going to Visual 
Studio there are a few things you need to "give up on" (In my opinion). Visual 
Studio (And Xcode) both like to separate build types into Debug/Release/Others 
and put those items compiled into those subfolders. If you try to have your 
output files put anywhere else you are endlessly "fighting the system" and in 
the you will waste more time trying to fight the system rather then working on 
your code. Unless you have a very valid reason why your built items MUST be in 
the binary folder then I wouldn't really worry where they land. Let Visual 
Studio or Xcode put them where they want. You only need to realize that there 
_are_ Debug and Release subfolders and it is in there that you will find your 
executables and libraries. This is said with about 3 or 4 years of working with 
Linux, OS X, Windows, Visual Studio, Xcode, Makefiles. Don't fight the system, 
just adapt to it and move on.

 I guess that was harsh. Sorry. Having said that I am very interested in 
knowing the specific reasons why you need your executables in the 
CMAKE_BINARY_DIRECTORY and can not have them in a subfolder.
--
Mike Jackson <www.bluequartz.net>

On Jan 8, 2012, at 1:28 PM, Renato Utsch wrote:

> Ok, I will look at that so.
> 
> But and the second problem? How can I redirect from the debug/release
> folder to the / folder of the project?
> 
> 
> Renato
> 
> 2012/1/8 Mateusz Loskot <mate...@loskot.net>:
>> On 8 January 2012 16:04, Eric Noulard <eric.noul...@gmail.com> wrote:
>>> 2012/1/8 Renato Utsch <renatout...@gmail.com>:
>>>> So I can do this by adding a command line parameter to do that. But
>>>> can't I simply set an option that behaves exactly as --config Debug ?
>>> 
>>> May be you could try to find out how Visual Studio
>>> is choosing the default built type?
>> 
>> Eric, spot on!
>> 
>> Renato, if you create new project from within Visual Studio,
>> what build configuration is used as default? Debug.
>> Your problem has nothing to do with CMake.
>> 
>> Best regards,
>> --
>> Mateusz Loskot, http://mateusz.loskot.net
> --
> 
> 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

Reply via email to