Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
Don't know if you read all the emails, but I already found a solution
to the problem with all exe's with one output dir.

If you are right about the list of solution configs, so my search ends
here, but I alredy solved the real problem, so it's ok...

Renato

2012/1/8 Fraser Hutchison :
> Hi Renato,
>
> If you mean the drop-down list of solution configs in the Visual Studio IDE,
> I think they're listed alphabetically with the first selected, regardless of
> how the .sln file is laid out.  I don't think there's anything CMake can do
> about this.
>
> BTW, I'd agree with the previous comments which advise against relocating
> all exes to a single output dir.  Having tried it in the past, bottom line -
> it made life more difficult and wasted a good bit of developer time.  You
> could consider copying the exe once built to a different directory - that
> should minimise the pain.  There's a thread here where Michael Hertling
> provides the correct command for this:
> http://www.cmake.org/pipermail/cmake/2011-April/043946.html
>
> Adding a postfix to each target's name could help too:
> SET_TARGET_PROPERTIES(foo PROPERTIES DEBUG_OUTPUT_NAME foo-d
> RELWITHDEBINFO_OUTPUT_NAME foo-rwdi MINSIZEREL_OUTPUT_NAME foo-msr).
>
> However, best option is to just go with the VS flow :-)
>
> Cheers,
>
> Fraser.
>
>
>
> On 08/01/2012 23:08, Renato Utsch wrote:
>
> CLIFFORD MAN, IT WORKED!
>
>
>
>
> This was everything I was looking for. Thanks:
>
>
>
>
>        # Configure the release changes (optimization)
>        set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
>
>
>
>
>        foreach( CONF_TYPE ${CMAKE_CONFIGURATION_TYPES} )
>                string( TOUPPER "${CONF_TYPE}" CONF_TYPE )
>                set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE}
> "${CMAKE_BINARY_DIR}" )
>        endforeach()
>
>
>
>
> Now is only the problem from the default to be "Release" or
> "RelMinSize", I don't know if the problem is with CMake, but I think
> that when setting CMAKE_BUILD_TYPE to "ReMinSize" it should set the
> standard to it. Sad it doesn't do that :(
>
>
>
>
> So, anyone knows any other way? Like the variable that cmake sets when
> using --config Release when calling it from the command line ?
>
>
>
>
> Renato
>
> 2012/1/8 Renato Utsch :
>
> CLIFFORD MAN, IT WORKED!
>
> This was everything I was looking for. Thanks:
>
>        # Configure the release changes (optimization)
>        set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
>
>        foreach( CONF_TYPE ${CMAKE_CONFIGURATION_TYPES} )
>                string( TOUPPER "${CONF_TYPE}" CONF_TYPE )
>                set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE}
> "${CMAKE_BINARY_DIR}" )
>        endforeach()
>
> Now is only the problem from the default to be "Release" or
> "RelMinSize", I don't know if the problem is with CMake, but I think
> that when setting CMAKE_BUILD_TYPE to "ReMinSize" it should set the
> standard to it. Sad it doesn't do that :(
>
> So, anyone knows any other way? Like the variable that cmake sets when
> using --config Release when calling it from the command line ?
>
> Renato
>
> 2012/1/8 Clifford Yapp :
>
> Hmm - that looks interesting.  I didn't know about
> SUPPORTS_PARALLEL_BUILD_TYPE - I'll have to review my setup with that
> in mind.
>
> Thanks!
>
> On Sun, Jan 8, 2012 at 4:52 PM, J Decker  wrote:
>
>      if( SUPPORTS_PARALLEL_BUILD_TYPE )  # will be set in visual
> studio type projects...
>        INSTALL( FILES ... DESTINATION ...${CMAKE_INSTALL_CONFIG_NAME}
> ... ) #CMAKE_INSTALL_CONFIG_NAME will be set for the build type you're
> doing.
>
> --
>
> 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
--

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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
CLIFFORD MAN, IT WORKED!




This was everything I was looking for. Thanks:




       # Configure the release changes (optimization)
       set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )




       foreach( CONF_TYPE ${CMAKE_CONFIGURATION_TYPES} )
               string( TOUPPER "${CONF_TYPE}" CONF_TYPE )
               set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE}
"${CMAKE_BINARY_DIR}" )
       endforeach()




Now is only the problem from the default to be "Release" or
"RelMinSize", I don't know if the problem is with CMake, but I think
that when setting CMAKE_BUILD_TYPE to "ReMinSize" it should set the
standard to it. Sad it doesn't do that :(




So, anyone knows any other way? Like the variable that cmake sets when
using --config Release when calling it from the command line ?




Renato

2012/1/8 Renato Utsch :
> CLIFFORD MAN, IT WORKED!
>
> This was everything I was looking for. Thanks:
>
>        # Configure the release changes (optimization)
>        set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
>
>        foreach( CONF_TYPE ${CMAKE_CONFIGURATION_TYPES} )
>                string( TOUPPER "${CONF_TYPE}" CONF_TYPE )
>                set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE} 
> "${CMAKE_BINARY_DIR}" )
>        endforeach()
>
> Now is only the problem from the default to be "Release" or
> "RelMinSize", I don't know if the problem is with CMake, but I think
> that when setting CMAKE_BUILD_TYPE to "ReMinSize" it should set the
> standard to it. Sad it doesn't do that :(
>
> So, anyone knows any other way? Like the variable that cmake sets when
> using --config Release when calling it from the command line ?
>
> Renato
>
> 2012/1/8 Clifford Yapp :
>> Hmm - that looks interesting.  I didn't know about
>> SUPPORTS_PARALLEL_BUILD_TYPE - I'll have to review my setup with that
>> in mind.
>>
>> Thanks!
>>
>> On Sun, Jan 8, 2012 at 4:52 PM, J Decker  wrote:
>>
>>>      if( SUPPORTS_PARALLEL_BUILD_TYPE )  # will be set in visual
>>> studio type projects...
>>>        INSTALL( FILES ... DESTINATION ...${CMAKE_INSTALL_CONFIG_NAME}
>>> ... ) #CMAKE_INSTALL_CONFIG_NAME will be set for the build type you're
>>> doing.
>> --
>>
>> 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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
>My current work-around is to peg all of the output directories for all
>the active configurations to the same directory - that negates much of
>the benefit of multiple-configuration IDE options, but does at least
>result in the expected run-from-build-directory behavior.  (It works
>for MSVC - we apparently have too many targets or something for
>XCode...)  You have to switch configs and re-build just like with Make
>files, but that's the tradeoff currently required for being able to
>run in the build directory.

Clifford, can you explain more what you said, I didn't understand...

You said that you change the output directories for all the active
configurations to the same directory? Well, how do you do that (if it
is what you said)? This is exactly what I want...



Renato
--

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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
No, it is perfectly valid and I understand you, but the problem is
that I'm rewriting a broken CMake script from the eAthena project (a
ragnarök online emulator), and it has a very old basis that would
cause a lot of trouble to change.

The executables _have_ to be on the ${CMAKE_SOURCE_DIR} when built,
because of a lot of files and dependencies... The original Visual
Studio project from eAthena already generates the executables _at_ the
${CMAKE_SOURCE_DIR} folder, I only want to make this happen.

If wasn't this I would do exactly what you said, but I can't. Maybe I
will have to create a separate build system for Visual Studio, but I
prefer to try fixing these problems with CMake than doing this.

Oh, and incredibly I have to force CMake to make an in-source build,
because of that I mixed ${CMAKE_SOURCE_DIR} and ${CMAKE_BINARY_DIR}
when explaining my situation here :P

That stackoverflow page seems promising. I will look at it, thanks!

Renato

2012/1/8 Michael Jackson :
> 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 
>
> 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 :
>>> On 8 January 2012 16:04, Eric Noulard  wrote:
>>>> 2012/1/8 Renato Utsch :
>>>>> 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
--

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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
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 :
> On 8 January 2012 16:04, Eric Noulard  wrote:
>> 2012/1/8 Renato Utsch :
>>> 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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
Good idea, I will try ^^

Renato

2012/1/8 Eric Noulard :
> 2012/1/8 Renato Utsch :
>> 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?
> In particular does this correspond to some value in the .sln file?
>
> Then grep around in CMake source code in order to see if CMake visual
> studio generators are setting this value somehow.
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
--

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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
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 ?

Renato

2012/1/8 John Drescher :
> On Sun, Jan 8, 2012 at 10:30 AM, Mateusz Loskot  wrote:
>> On 8 January 2012 15:21, Renato Utsch  wrote:
>>> Yes, but I want to be able to change with CMake, but if I can't do
>>> that, at least I want to be able to set the default to the Release
>>> version :X
>>
>> You have to understand there is difference between generators like
>> makefiles and generators for projects for IDEs which allow to switch
>> between build configurations from within IDE, like Visual Studio does.
>>
>> IMHO, CMAKE_BUILD_TYPE is irrelevant for IDEs like Visual Studio
>> and valid workflow is equivalent to this:
>>
>> cmake -G "Visual Studio 2010"
>> msbuild myproj.sln /p:Configuration=Debug
>>
>> or
>>
>> load myproj.sln in VS IDE and change configuration there.
>>
>> Obviously, for makefiles, CMAKE_BUILD_TYPE is the way to go.
>>
>
> An alternate way is
>
> cmake --build myprojectsbuildfolder --config myconfiguration
>
> for example:
>
> cmake --build X:/64bit/VC.100/Qt/StudyManager --config Debug
>
> John
--

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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
But why CMake generates the Debug mode thing first, not the Release? I
can only configure this with msbuild executable? Because I can't find
it :X

I only need to make the Release mode the standard one, there isn't a
way to do that changing a configuration with CMake?

Renato

2012/1/8 Mateusz Loskot :
> On 8 January 2012 15:21, Renato Utsch  wrote:
>> Yes, but I want to be able to change with CMake, but if I can't do
>> that, at least I want to be able to set the default to the Release
>> version :X
>
> You have to understand there is difference between generators like
> makefiles and generators for projects for IDEs which allow to switch
> between build configurations from within IDE, like Visual Studio does.
>
> IMHO, CMAKE_BUILD_TYPE is irrelevant for IDEs like Visual Studio
> and valid workflow is equivalent to this:
>
> cmake -G "Visual Studio 2010"
> msbuild myproj.sln /p:Configuration=Debug
>
> or
>
> load myproj.sln in VS IDE and change configuration there.
>
> Obviously, for makefiles, CMAKE_BUILD_TYPE is the way to go.
>
> 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


Re: [CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
Yes, but I want to be able to change with CMake, but if I can't do
that, at least I want to be able to set the default to the Release
version :X

Renato

2012/1/8 Rolf Eike Beer :
> Am Sonntag, 8. Januar 2012, 12:29:47 schrieb Renato Utsch:
>> Hello, I have been experimenting some issue with visual studio and
>> couldn't fix them, even when searching in google for help :O
>>
>> So, I have 2 main issues:
>>
>> 1. When CMake creates the visual studio solution, it configures to the
>> "Debug win32" mode, but I wanted to be able to choose from "Release"
>> to "Debug".
>> Changing the CMAKE_BUILD_TYPE to "Release" didn't seem to help...
>
> All 4 configurations are created, you can change it in MSVC itself (using 
> Build
> -> Choose Configuration or something like that IIRC).
>
> Eike
> --
>
> 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


[CMake] Some issues with visual studio

2012-01-08 Thread Renato Utsch
Hello, I have been experimenting some issue with visual studio and
couldn't fix them, even when searching in google for help :O

So, I have 2 main issues:

1. When CMake creates the visual studio solution, it configures to the
"Debug win32" mode, but I wanted to be able to choose from "Release"
to "Debug".
Changing the CMAKE_BUILD_TYPE to "Release" didn't seem to help...


2. I configured the EXECUTABLE_OUTPUT_PATH to ${CMAKE_BINARY_DIR}, but
when the Visual Studio build the executables, it put them in the
${CMAKE_BINARY_DIR}/Debug folder, but I want them in the
${CMAKE_BINARY_DIR} folder!


So, may anyone please help me? I couldn't find the solution to these
problems anywhere else! :X


Renato
--

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


Re: [CMake] Documentation request

2011-12-21 Thread Renato Utsch
Yes, exactly, the way it is now is not obvious, but it should be.

I indeed thought that CMake 2.8 documentation was for 2.8.*, but I
discovered this week that it wasn't. And I'm sure that this happens
with A LOT of people.

Renato

2011/12/21 Tim Gallagher :
> I like the idea of putting "new in #.#.#" when features are added, that would 
> at least be an easy reminder on the documentation page that some things are 
> not universal to 2.8.*.
>
> I also agree that it's not super clear that back documentation is available 
> on the wiki. If you look at the documentation page, it says things like 
> "Documentation for CMake 2.8", "Documentation for CMake 2.6" and then at the 
> bottom under "Legacy Documentation for CMake" there is a section for CMake 
> 2.4.
>
> To me that implies that
>
> A) documentation holds for all versions of 2.8.* or 2.6.* or 2.4.*;
> B) there is only documentation for those versions and the wiki would hold 
> other types of information (and if you just go to the main page of the wiki, 
> there is no indication that old versions are documented, I had to search to 
> find it).
>
> So, I understand all to well how time consuming writing documentation is. And 
> if space is an issue, how about the following:
>
> A) Rename the links on the documentation page so that it says it is for the 
> current version, so it would say "Documentation for CMake 2.8.7" when the 
> next is released.
> B) Under "Legacy Documentation", put a link to the CMake_Released_Versions 
> page on the wiki to point people to that documentation.
>
> Does that sounds like a reasonable compromise? We've run into this frequently 
> enough that I thought I'd bring it up, but as I said before, if we're the 
> only ones who keep making these mistakes, then we can deal with it internally.
>
> Tim
>
> - Original Message -
> From: "Renato Utsch" 
> To: cmake@cmake.org
> Sent: Wednesday, December 21, 2011 8:38:27 AM
> Subject: Re: [CMake] Documentation request
>
> Yes, but is not so easy to find. It would be easier to have it in the
> documentation page (if the page hosts CMake 2.6 or CMake 2.4
> documentations, why it doesn't host CMake 2.8.3 documentation? They
> should be on the wiki too!), easier to find.
>
> Renato
>
> 2011/12/21 Michael Wild :
>> As I already said, all the old documentation (back to version 1.6,
>> AFAIK) is available on the wiki.
>>
>> Michael
>>
>> On 12/21/2011 01:12 PM, Renato Utsch wrote:
>>>> You ?
>>>> This represents a fair amount of work...
>>>> I bet that if no-one did it it is because it's a hUGe task.
>>>
>>> Sorry, I am not that good with english, I meant as the CMake team with
>>> 'you'. But the 'CMake team' could do that with new releases, like,
>>> writing this warning with additions in the newer releases.
>>>
>>> Or, the easier way, to mantain different versions of the documentation
>>> at the site. This is not difficult, maybe put the latest doc in the
>>> "Documentation" page and down in the "see also" of the documentation a
>>> link to the older ones, or maybe everything in the documentation
>>> page...
>>>
>>> Renato
>>>
>>>
>>>
>>> 2011/12/21 Eric Noulard :
>>>> 2011/12/21 Renato Utsch :
>>>>> I had the same problem a yesterday (or the day before) with the
>>>>> string( FIND ) command...
>>>>>
>>>>> I tried to find the cmake 2.8.4 docs but I couldn't.
>>>>
>>>> cmake command **itself** is able to spit out its documentation.
>>>> So
>>>>
>>>> cmake --help-command string
>>>>
>>>> will give you the hopefully up to date doc of the currently used cmake.
>>>> In the same way:
>>>> cmake --help-full
>>>> cmake --help-html
>>>>
>>>> will give you a doc similar to
>>>> http://www.cmake.org/cmake/help/cmake-2-8-docs.html
>>>>
>>>> but for the currently used cmake.
>>>>
>>>>>  I think you should do it, or at least to issue a warning (in the 
>>>>> documentation) in
>>>>> every command that wasn't introduced in CMake 2.8.0...
>>>>
>>>> You ?
>>>> This represents a fair amount of work...
>>>> I bet that if no-one did it it is because it's a hUGe task.
>>>>
>>>> --
>>>> Erk
>

Re: [CMake] Documentation request

2011-12-21 Thread Renato Utsch
Yes, but is not so easy to find. It would be easier to have it in the
documentation page (if the page hosts CMake 2.6 or CMake 2.4
documentations, why it doesn't host CMake 2.8.3 documentation? They
should be on the wiki too!), easier to find.

Renato

2011/12/21 Michael Wild :
> As I already said, all the old documentation (back to version 1.6,
> AFAIK) is available on the wiki.
>
> Michael
>
> On 12/21/2011 01:12 PM, Renato Utsch wrote:
>>> You ?
>>> This represents a fair amount of work...
>>> I bet that if no-one did it it is because it's a hUGe task.
>>
>> Sorry, I am not that good with english, I meant as the CMake team with
>> 'you'. But the 'CMake team' could do that with new releases, like,
>> writing this warning with additions in the newer releases.
>>
>> Or, the easier way, to mantain different versions of the documentation
>> at the site. This is not difficult, maybe put the latest doc in the
>> "Documentation" page and down in the "see also" of the documentation a
>> link to the older ones, or maybe everything in the documentation
>> page...
>>
>> Renato
>>
>>
>>
>> 2011/12/21 Eric Noulard :
>>> 2011/12/21 Renato Utsch :
>>>> I had the same problem a yesterday (or the day before) with the
>>>> string( FIND ) command...
>>>>
>>>> I tried to find the cmake 2.8.4 docs but I couldn't.
>>>
>>> cmake command **itself** is able to spit out its documentation.
>>> So
>>>
>>> cmake --help-command string
>>>
>>> will give you the hopefully up to date doc of the currently used cmake.
>>> In the same way:
>>> cmake --help-full
>>> cmake --help-html
>>>
>>> will give you a doc similar to
>>> http://www.cmake.org/cmake/help/cmake-2-8-docs.html
>>>
>>> but for the currently used cmake.
>>>
>>>>  I think you should do it, or at least to issue a warning (in the 
>>>> documentation) in
>>>> every command that wasn't introduced in CMake 2.8.0...
>>>
>>> You ?
>>> This represents a fair amount of work...
>>> I bet that if no-one did it it is because it's a hUGe task.
>>>
>>> --
>>> Erk
>>> Membre de l'April - « promouvoir et défendre le logiciel libre » -
>>> http://www.april.org
>> --
>>
>> 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
--

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


Re: [CMake] Documentation request

2011-12-21 Thread Renato Utsch
> You ?
> This represents a fair amount of work...
> I bet that if no-one did it it is because it's a hUGe task.

Sorry, I am not that good with english, I meant as the CMake team with
'you'. But the 'CMake team' could do that with new releases, like,
writing this warning with additions in the newer releases.

Or, the easier way, to mantain different versions of the documentation
at the site. This is not difficult, maybe put the latest doc in the
"Documentation" page and down in the "see also" of the documentation a
link to the older ones, or maybe everything in the documentation
page...

Renato



2011/12/21 Eric Noulard :
> 2011/12/21 Renato Utsch :
>> I had the same problem a yesterday (or the day before) with the
>> string( FIND ) command...
>>
>> I tried to find the cmake 2.8.4 docs but I couldn't.
>
> cmake command **itself** is able to spit out its documentation.
> So
>
> cmake --help-command string
>
> will give you the hopefully up to date doc of the currently used cmake.
> In the same way:
> cmake --help-full
> cmake --help-html
>
> will give you a doc similar to
> http://www.cmake.org/cmake/help/cmake-2-8-docs.html
>
> but for the currently used cmake.
>
>>  I think you should do it, or at least to issue a warning (in the 
>> documentation) in
>> every command that wasn't introduced in CMake 2.8.0...
>
> You ?
> This represents a fair amount of work...
> I bet that if no-one did it it is because it's a hUGe task.
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
--

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


Re: [CMake] Documentation request

2011-12-21 Thread Renato Utsch
I had the same problem a yesterday (or the day before) with the
string( FIND ) command...

I tried to find the cmake 2.8.4 docs but I couldn't. I think you
should do it, or at least to issue a warning (in the documentation) in
every command that wasn't introduced in CMake 2.8.0...

Yes, the Python way to do this is more organized.

Renato

2011/12/21 Rolf Eike Beer :
> Am Mittwoch 21 Dezember 2011, 06:14:03 schrieb Michael Wild:
>
>> OTOH, I think it would be very useful to mention the first version a
>> feature was introduced in the docs directly, similarly to what Python
>> does (see e.g.
>> http://docs.python.org/library/string.html#string-formatting).
>
> We already discussed this a while ago (like a year or so) and AFAIR the
> outcome was to do this for every newly added feature. Seems like nobody did
> it.
>
> Eike
> --
>
> 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


[CMake] Fwd: Problem with string( FIND xxx ) in cygwin

2011-12-20 Thread Renato Utsch
Is there any substitute that could enable me to find a substring in a
determinated string? Because I need to support 2.8.4 because of
Cygwin...

Renato

2011/12/20 Renato Utsch :
> Ah, ok, thanks.
>
> Renato
>
> 2011/12/20 David Cole :
>> The FIND subcommand for the string command was introduced in CMake
>> 2.8.5 as a result of this bug fix:
>>
>>  http://public.kitware.com/Bug/view.php?id=11795
>>
>>
>> It does not exist in 2.8.4...
>>
>>
>> On Tue, Dec 20, 2011 at 7:53 AM, Renato Utsch  wrote:
>>> I am using CMake 2.8.4 in cygwin (the version that comes with
>>> setup.exe), but it doesn't recognize the string( FIND <...> ) command,
>>> although it works in linux and windows very well.
>>>
>>> Is there any library I need to install in cygwin to make this work or
>>> the build from them is not working?
>>>
>>>
>>> Renato
>>> --
>>>
>>> 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


[CMake] Problem with string( FIND xxx ) in cygwin

2011-12-20 Thread Renato Utsch
I am using CMake 2.8.4 in cygwin (the version that comes with
setup.exe), but it doesn't recognize the string( FIND <...> ) command,
although it works in linux and windows very well.

Is there any library I need to install in cygwin to make this work or
the build from them is not working?


Renato
--

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


[CMake] How to add "modifiers" to functions

2011-12-16 Thread Renato Utsch
I am trying to make a function that will check if the build is
in-source or out-of-source. But I wanted to add a "REQUIRED"
'modifier' to the function, that if it finds that the build in
in-source, and if we specify "REQUIRED" (as with, like, find_package()
CMake command) it would show an error message to the console. It would
be like above to call it:

check_build_in_source( VARIABLE REQUIRED )

How can I make this?


Renato
--

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


[CMake] How to find list of directories

2011-12-15 Thread Renato Utsch
Hello,

I am writing a plugin compiler that will do linke this:

-- main
 plugin
| CMakeLists.txt (in the plugin folder)
-- example (example plugin)
--| CMakeLists.txt (in the example folder)

The CMakeLists.txt file inside the plugin folder will do a foreach() to use
add_subdirectory() for each folder inside the plugin directory:

foreach( FOREACH_FOLDER ${FOLDERS_INSIDE_PLUGIN} )
add_subdirectory( ${FOREACH_FOLDER} )
endforeach()

Then, the CMakeLists.txt of each folder will do the compilation of the
plugin


How can I set the FOLDERS_INSIDE_PLUGIN variable to a list with all the
folder names in the plugin directory? My program will be compiled only in
UNIX (and cygwin), so if there is an UNIX command that does this, it can
work as well (couldn't remember any)...


Renato
--

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

[CMake] Some suggestions to TestForPosix module I wrote

2011-12-14 Thread Renato Utsch
I wrote a TestForPosix module for looking if the system supports a POSIX /
XPG / SUS standard and I wanted for you experts to look and criticize if
you find anything wrong. I would also ask how can I make a request for it
to be included in CMake 2.8.7, because it is (in my opinion) a very good
contribution to the CMakeModules...

Well, here is the download link (unix line feeds):

http://ge.tt/8CVeNDB

Only put it in the Modules folder of CMake if you want to test (otherwise
you'll have to configure the path to the .in file...)


Thanks!
--

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

Re: [CMake] How to make a shared library to use relative paths to the executable

2011-12-07 Thread Renato Utsch
>I  think it's $ORIGIN, not @ORIGIN.
>
>Alex

This works with WIN files too?
--

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

[CMake] Program with Qt opening with a bash screen on windows before showing the gui...

2011-11-30 Thread Renato Utsch
Hello CMake guys...

Well, I was writing a portable program using CMake that uses Qt as it's GUI
framework...

I compiled it on linux and it worked really well, no problems. But when
compiling on Windows, the program opened a blank bash screen before opening
the proper gui. I thought that this could be with Qt itself, but when I
tried with qmake, the program runned normally, without any bash screen
opening...

I used the Visual C++ Express 2008 to compile, with Qt libraries 4.7.4 for
the Visual 2008. Here is the CMakeLists.txt:

project(test CXX)
cmake_minimum_required(VERSION 2.8)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(test_SRCS
main.cpp
MainWindow.cpp
)
set(test_MOC_SRCS
MainWindow.hpp
)

set(test_RCCS
rc.qrc
)
qt4_wrap_cpp(test_MOCS ${test_MOC_SRCS})
qt4_add_resources(test_RCC_SRCS ${test_RCCS})
add_definitions(-DQT_NO_DEBUG)
add_executable(test
${test_SRCS}
${test_MOCS}
${test_RCC_SRCS})
target_link_libraries(test ${QT_LIBRARIES})

If there is any solution to this I would be very grateful, because I really
want to use CMake.


Thanks!


Renato
--

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

[CMake] How to link against libraries in subdirectory (windows workaround)

2011-10-29 Thread Renato Utsch
Hello!

Well, I am currently using cURL for a project of mine, but on windows I
can't find the cURL library only using the find_package(CURL) provided with
CMake, although it works fine with linux.

So, I created a directory named "deps" in my source directory. How can I
make the find_package to look at this directory before looking at the
default directories? Like:

# Look firstly at the /deps directory, if finds the libcurl.a and the
include/curl folder set the CURL_FOUND macro and the other ones that the
find_package() automatically provides...

if( NOT CURL_FOUND )
# Then looks at the default paths.
find_package(CURL REQUIRED)
endif()


So, how can I make it to do that? It is better to look first at the /deps
directory because of that even linux users can provide a build different
than the one installed in its system, making the build more flexible. And on
Windows the users can put the lib files there to be found by CMake.

If there is any better solution with this problem with Windows, I am open to
suggestions.


Thanks!

Renato
--

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

[CMake] How to make a shared library to use relative paths to the executable

2011-10-25 Thread Renato Utsch
Hello!

I am learning to use CMake and I found it very easy to use, very and very
good. But I don't understand why it uses full paths instead of relative
paths when linking shared/dynamic libraries. I am currently making a program
that is only compiled to a folder, but not installed to the system (on
linux), much like a folder containing all the software in windows. It has
the following structure (when compiled):

 program <-- Main folder of the project
 bin <-- Executable and shared libraries of the executable
 data <-- Stores data files and information for runtime
 plugins <-- Stores shared libraries which (I want) can be added or
removed after the compilation process which adds custom behaviour to the
program.

The real problem is: I can't link these shared libraries from the folder
/program/plugins to the application at the /program/bin folder. I want this
to be organized. How can I link by that?

Other problem: the compilation has a lot of dependencies (qt, compiled boost
libraries, opengl, between others), and this makes the compilation a bit
difficult on Windows. So, I wanted to be able to zip the compiled folder
(with all the needed libraries) and distribute the folder for the users. But
when I move the program from one directory to another, it stops working. Is
there any way, even hacky, to make CMake to use relative paths? Because all
IDE's, other makes, allow doing this, so why CMake obligates us to use full
paths? It would be so perfect by that...

There is any way or I will have to use a non-portable way of compiling?


Thanks for the help!

Renato
--

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

[CMake] [CPACK] CPack not working properly

2011-08-23 Thread Renato Utsch
Hello CMake Experts!

I don't know if it's here that I have to ask, so if I'm wrong, please tell
me.

I used the CPack and it stopped making the binary package at the middle of
the process, running like this:

-
Run CPack packaging tool...
CPack: Create package using STGZ
CPack: Install projects
CPack: - Run preinstall target for: hello
CPack: - Install project: hello
CPack: Create package
CPack: - package: /home/renato/devel/CMakeTest/
build/hello-0.1.1-Linux.sh  generated.
CPack: Create package using TBZ2
CPack: Install projects
CPack: - Run preinstall target for: hello
CPack: - Install project: hello
CPack: Create package
CPack: - package:
/home/renato/devel/CMakeTest/build/hello-0.1.1-Linux.tar.bz2 generated.
-

It does not add the files to the package, so it becomes a empty package,
which does not have any file?

How can I solve that too?



I don't know if it matters, but here's my CMakeLists.txt:

-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
INCLUDE(InstallRequiredSystemLibraries)
PROJECT(hello C)
OPTION(USE_SHARED_LIBRARY "Use a Shared Library" OFF)
IF(USE_SHARED_LIBRARY)
ADD_LIBRARY(hellolib SHARED hellolib.c)
ELSE(USE_SHARED_LIBRARY)
ADD_LIBRARY(hellolib STATIC hellolib.c)
ENDIF(USE_SHARED_LIBRARY)
ADD_EXECUTABLE(hello hello.c)
TARGET_LINK_LIBRARIES(hello hellolib)
INCLUDE(CPack)
-


Thanks to everyone!
___
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

[CMake] [CMAKE] Problem when moving an executable with a shared library

2011-08-23 Thread Renato Utsch
Hello CMake Experts!

I don't know if it's here that I have to ask, so if I'm wrong, please tell
me.


I'm having a problem with CMake. Let me explain:

I use CMake to build a program and a shared library (let me say, "hello" and
"libhello.so"). When I use them from my build folder (if the folder with the
source is /tmp/hello, the folder with the build is /tmp/hello/build), they
work perfectly. But if I move them to another folder (like to /home/Renato
), "hello" does not run, unless if i put the "libhello.so" in the folder
/tmp/hello/build. I wanted to make the "hello" executable to look at the
same folder to where it is, not to the "/tmp/hello/build" folder, which
doesn't change.

How can I make that?



And I have another question. I used the CPack and it stopped making the
binary package at the middle of the process, running like this:

-
Run CPack packaging tool...
CPack: Create package using STGZ
CPack: Install projects
CPack: - Run preinstall target for: hello
CPack: - Install project: hello
CPack: Create package
CPack: - package: /home/renato/devel/CMakeTest/
build/hello-0.1.1-Linux.sh  generated.
CPack: Create package using TBZ2
CPack: Install projects
CPack: - Run preinstall target for: hello
CPack: - Install project: hello
CPack: Create package
CPack: - package:
/home/renato/devel/CMakeTest/build/hello-0.1.1-Linux.tar.bz2 generated.
-

It does not add the files to the package, so it becomes a empty package,
which does not have any file?

How can I solve that too?



I don't know if it matters, but here's my CMakeLists.txt:

-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
INCLUDE(InstallRequiredSystemLibraries)
PROJECT(hello C)
OPTION(USE_SHARED_LIBRARY "Use a Shared Library" OFF)
IF(USE_SHARED_LIBRARY)
ADD_LIBRARY(hellolib SHARED hellolib.c)
ELSE(USE_SHARED_LIBRARY)
ADD_LIBRARY(hellolib STATIC hellolib.c)
ENDIF(USE_SHARED_LIBRARY)
ADD_EXECUTABLE(hello hello.c)
TARGET_LINK_LIBRARIES(hello hellolib)
INCLUDE(CPack)
-


Thanks to everyone!
___
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