Re: [CMake] help: Does CMake support Vxworks platform?

2013-02-04 Thread Michael Wild
AFAIK you will need to cross-compile for VxWorks, and for that you need a toolchain file that describes the cross-compile toolchain (compiler, linker, archiver, etc.) to CMake. Googling I found this: https://github.com/alexbrinister/vxWorks-GCC-NashobaRobotics/blob/master/vxworks-toolchain.cmake. P

[CMake] help: Does CMake support Vxworks platform?

2013-02-04 Thread Xuyongli
Hello, I will use CMake to our project. Our project runs on Vxworks, Suse Linux, and Windows, So I want CMake supports Vxworks. Also I could modify the source code, but that is difficult for me. So I hope developers could add the Vxworks platform supported. Xu,YongLi -- Powered by www.kitware

Re: [CMake] How to trigger compiler option load without project()

2013-02-04 Thread David Cole
enable_language() On Feb 4, 2013, at 5:17 PM, J Decker wrote: > Is there a way to trigger cmake to load the comipler version and set build > environemnt flags based on the generator without a project() ? > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at

[CMake] How to trigger compiler option load without project()

2013-02-04 Thread J Decker
Is there a way to trigger cmake to load the comipler version and set build environemnt flags based on the generator without a project() ? -- 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

Re: [CMake] Visual studio november CTP compiler?

2013-02-04 Thread Brad King
On 02/03/2013 12:54 PM, terje loe wrote: > set_target_properties(MyTarget PROPERTIES PLATFORM_TOOLSET "v120_CTP_Nov2012") > > I don't know if this is the correct way to do it, but if it is it would > be cool if it was implemented.. or some other solution. There are similar feature requests in the

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Luigi Calori
I think your question make sense, I would be interested to know proposed solutions, as likely have similar problems. I' m far from being a cmake guru, but I like SuperBuild pattern as well . I would do these steps: 0) define where are on the different platform the sources of the SDL library

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread David Cole
The OpenChemistry project ( https://github.com/OpenChemistry/openchemistry ) is a very good example of a SuperBuild project that builds all of its external dependencies via ExternalProject, and then all of its git submodules ("internal dependencies" perhaps ?) also via ExternalProject. They use

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Kent Williams
The real world example is Slicer -- http://www.slicer.org/pages/DeveloperOrientation This is rather a large and complex project and the way they do somethings is hard to decode. Make sure you read through and understand this: http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Michael Wild
In a SuperBuild, all projects, even your own, are built by one large "super-build" project that contains a series of ExternalProject_Add calls. That's all there is to it. On Mon, Feb 4, 2013 at 4:23 PM, Ansis Māliņš wrote: > >SuperBuild pattern > Tell me all about it! > > -- > > Powered by www.

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
How did you compile SDL? Most generally, you would do: find_path(SDL2_INCLUDE_DIR SDL.h PATH_SUFFIXES SDL2) # I have no idea against which libraries you have to link, so you might need more than this find_library(SDL2_LIBRARY SDL) if(NOT SDL2_INCLUDE_DIR OR NOT SDL2_LIBRARY) message(SEND_ERROR

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Ansis Māliņš
>SuperBuild pattern Tell me all about it! -- 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/uns

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Kent Williams
They are two different things entirely. add_subdirectory is used when you have a project structured hierarchically in directories and subdirectories, but you want the entire project configured at one time. ExternalProject is used to download, configure and build a project that is a prerequisite t

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Michael Wild
If your project is open source and you want to have any chance of it ever being included in any of the major Linux distros without making somebody very angry at you, forget about add_subdirectory() for external dependencies. On Mon, Feb 4, 2013 at 3:29 PM, Theodore Papadopoulo < theodore.papadopo

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/04/2013 09:23 AM, Ansis Māliņš wrote: > If I have a dependency (e.g. SDL2) that seems to work with > add_subdirectory just fine, should I still use ExternalProject_Add > instead? Given both ways work, what should I prefer? What are the > tradeo

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
It looks like I'm still asking the wrong questions. As a last resort, here's my specific problem: I want to compile and run a hello world SDL2 application on Windows, Linux, and OS X - purely as an exercise in CMake. How would YOU do this? SDL2 only exists in source form in their repository. Thi

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Bill Hoffman
On 2/4/2013 8:05 AM, Ansis Māliņš wrote: Exactly! So, going back to my original question, how do I use CMake in face of DLL Hell? Does this help you at all: http://www.kitware.com/blog/home/post/4 -- Bill Hoffman Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 bill.hoff...@kitware.com

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Andreas Haferburg
DLL Hell becomes an issue when executing a program. The EXE needs to use the DLLs that correspond to the LIB files it was linked against. I think you're only concerned with building a library or an executable here. The way CMake is designed is that you simply call find_package(), and the FindX.

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
Leave it to your user. Not your problem. Use find_package() (or find_library() and find_path()) as appropriate, do your best to deal with common situations (e.g. Python or Qt having keys in the registry telling you the installation location), and then trust your user to know what he does. That's al

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
Exactly! So, going back to my original question, how do I use CMake in face of DLL Hell? On Mon, Feb 4, 2013 at 2:58 PM, Michael Wild wrote: > That has nothing to do whether the libraries are shared (i.e. dynamically > linked) or not. It has to do with the way that packaging works (or rather, >

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
That has nothing to do whether the libraries are shared (i.e. dynamically linked) or not. It has to do with the way that packaging works (or rather, doesn't work) on Windows. In the pre-.NET era it was simply impossible to use library versioning on Windows. If package A installed python.dll version

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
If shared libraries on Windows are truly shared, then why so many applications carry their own copies of that same Qt and Python? Examples from my own Program Files: Anki, Blender, Mixxx, Mumble, TortoiseHg. On Mon, Feb 4, 2013 at 2:15 PM, Michael Wild wrote: > Hi > > > On Mon, Feb 4, 2013 at 1

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Benjamin Eikel
Am Montag, 4. Februar 2013, 09:23:20 schrieb Ansis Māliņš: > If I have a dependency (e.g. SDL2) that seems to work with add_subdirectory > just fine, should I still use ExternalProject_Add instead? Given both ways > work, what should I prefer? What are the tradeoffs? Hello Ansis, most of the time

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
Hi On Mon, Feb 4, 2013 at 12:43 PM, Ansis Māliņš wrote: > I'm just learning CMake and posting questions in this mailing list, but > the answers I get only confuse me. It seems I must take a step back and ask > more general questions. > > In Linux there is a package for everything, so you just fi

Re: [CMake] unable to view file properties using CMAKE 2.8.7 in VS2010

2013-02-04 Thread Andreas Haferburg
The workaround I use is to set the build directory to another drive. I added a batch file to my Startup folder which contains only this line: subst b: G:\dev\build Regards, Andreas On 31.01.2013 21:00, Bryn Aspestrand wrote: Ah, this seems to be an issue with the generated files clashing wit

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Michael Wild
I don't know about Windows, but then you might have a team that shares a common SDL build on a network drive, and then references that using the ExternalProject feature instead of building this external dependency over and over again. On Mon, Feb 4, 2013 at 12:26 PM, Ansis Māliņš wrote: > "SDL i

[CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
I'm just learning CMake and posting questions in this mailing list, but the answers I get only confuse me. It seems I must take a step back and ask more general questions. In Linux there is a package for everything, so you just find_package whatever you need. But on Windows most libraries exist o

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Ansis Māliņš
"SDL installation"? But there is no such thing. At least not on Windows. ... Right? On Mon, Feb 4, 2013 at 1:10 PM, Michael Wild wrote: > In that case, clearly ExternalProject_Add. It is an external dependency, > and should be treated as such. If a users have SDL already installed on > their sy

Re: [CMake] unable to view file properties using CMAKE 2.8.7 in VS2010

2013-02-04 Thread Petr Kmoch
Hi Bryn, you might want to experiment with the (somewhat erratic) global variable CMAKE_USE_RELATIVE_PATHS. Petr On Thu, Jan 31, 2013 at 9:04 PM, Bryn Aspestrand wrote: > Yeah, CMAKE changed to relative pathing in VS2010 projects which fixes the > issue with a bug in VS but I unfortunately can'

[CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Ansis Māliņš
If I have a dependency (e.g. SDL2) that seems to work with add_subdirectory just fine, should I still use ExternalProject_Add instead? Given both ways work, what should I prefer? What are the tradeoffs? -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.