Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread Michael Hertling
On 03/11/2011 09:41 PM, Jim Newsome wrote: > That doesn't quite work either. I get some errors about circular > dependencies. Strangely, doing it this way hello.bin _does_ get built, Yes, I can see these messages - not errors - too, but obviously, they don't prevent the hello.bin file from being g

[CMake] How to specify precedence when using enable_language to search for compilers

2011-03-11 Thread rocwhite168
Hi everyone, I wonder how I can specify precedence when using enable_language to search for compilers. For example, if my system has both ifort and gfortran installed, and I want to use ifort instead of the gfortran, how could I set up this? >From what I currently found, a work-around is to set C

Re: [CMake] Pre-processor flags issue

2011-03-11 Thread Rolf Eike Beer
Am Freitag 11 März 2011, 23:08:43 schrieb Enrique Izaguirre: > Hello friends, > > I am trying to cross-compile an application from Windows to Linux. My > Toolchain file looks like this: > > set(CMAKE_SYSTEM_NAME Linux) > > #specify the cross-compiler > set (CMAKE_C_COMPILER /bin/gcc-linux) > set

[CMake] Pre-processor flags issue

2011-03-11 Thread Enrique Izaguirre
Hello friends, I am trying to cross-compile an application from Windows to Linux. My Toolchain file looks like this: set(CMAKE_SYSTEM_NAME Linux) #specify the cross-compiler set (CMAKE_C_COMPILER /bin/gcc-linux) set (CMAKE_CXX_COMPILER /bin/g++-linux) The problem is that I have in my main CMak

Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread Jim Newsome
That doesn't quite work either. I get some errors about circular dependencies. Strangely, doing it this way hello.bin _does_ get built, but it gets built every time, even if 'hello' hasn't changed. I imagine this behavior could depend on the build system- I'm using GNU make 3.81. Here's what I ge

Re: [CMake] Eclipse generator - scanner-discovered include paths and pre-processor symbols

2011-03-11 Thread David Cole
On Fri, Mar 11, 2011 at 2:10 PM, Alexander Neundorf wrote: > On Friday 11 March 2011, Chatterjee, Shash wrote: >> Hi, >> >> Using CDT-2.8.2 on Fedora Core 14, and Eclipse Indigo/CDT (20101216-1529). >> >> Most everything works fine in the .project/.cproject, except the CDT >> indexer cannot find t

Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread Michael Hertling
On 03/11/2011 08:00 PM, David Cole wrote: > On Fri, Mar 11, 2011 at 12:05 PM, Jim Newsome wrote: >> Unfortunately it seems that the target needs to have a different name >> from its dependencies. When building I get: >> make[2]: Circular CMakeFiles/hello.bin <- hello.bin dependency dropped. >> >>

Re: [CMake] Eclipse generator - scanner-discovered include paths and pre-processor symbols

2011-03-11 Thread Alexander Neundorf
On Friday 11 March 2011, Chatterjee, Shash wrote: > Hi, > > Using CDT-2.8.2 on Fedora Core 14, and Eclipse Indigo/CDT (20101216-1529). > > Most everything works fine in the .project/.cproject, except the CDT > indexer cannot find the compiler's built-in include paths/files and > pre-processor symbo

Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread David Cole
On Fri, Mar 11, 2011 at 12:05 PM, Jim Newsome wrote: > Unfortunately it seems that the target needs to have a different name > from its dependencies. When building I get: > make[2]: Circular CMakeFiles/hello.bin <- hello.bin dependency dropped. > > Another workaround I thought of is to change the

[CMake] Eclipse generator - scanner-discovered include paths and pre-processor symbols

2011-03-11 Thread Chatterjee, Shash
Hi, Using CDT-2.8.2 on Fedora Core 14, and Eclipse Indigo/CDT (20101216-1529). Most everything works fine in the .project/.cproject, except the CDT indexer cannot find the compiler's built-in include paths/files and pre-processor symbols. To fix that, all that has to be done is to go into the

Re: [CMake] How to change default target in solution?

2011-03-11 Thread aaron.meadows
Sorry, the .sln is what I meant by "the solution file generated by CMake". Thanks for catching that, it wasn't clear the way I wrote it. =D English fail! When I was smashing around in the solution file to try and get ALL_BUILD to be the default project but also have it stored in the PREDEFINED

Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread Jim Newsome
Unfortunately it seems that the target needs to have a different name from its dependencies. When building I get: make[2]: Circular CMakeFiles/hello.bin <- hello.bin dependency dropped. Another workaround I thought of is to change the output filename to, e.g., _hello.bin and have a command in the

Re: [CMake] adding a custom command with the file name as a target

2011-03-11 Thread Tyler
The target in the Makefile is created with the add_custom_target() call. So just change yours to: add_custom_target(hello.bin ALL DEPENDS hello.bin) hth, tyler On Fri, Mar 11, 2011 at 7:58 AM, Jim Newsome wrote: > I'd like to do something like add_custom_command, with the output file > name as

Re: [CMake] How to change default target in solution?

2011-03-11 Thread Bill Hoffman
On 3/11/2011 9:56 AM, aaron.mead...@thomsonreuters.com wrote: You can't. The default target is stored in the .suo file. That file is generated by visual studio when it loads the solution file. The rules that Visual studio uses for chosing the default target are not published and don't seem to

[CMake] adding a custom command with the file name as a target

2011-03-11 Thread Jim Newsome
I'd like to do something like add_custom_command, with the output file name as a target in the generated makefile. Is there an elegant way of doing this? The closest I've come is: add_executable (hello hello.c) add_custom_command(OUTPUT hello.bin COMMAND objcopy --output-format

Re: [CMake] INSTALL CODE using EXEC_PROGRAM with spaces in path

2011-03-11 Thread David Cole
Tyler's right. Use install(SCRIPT instead. And use execute_process instead of exec_program. It's better. >From the help at http://cmake.org/cmake/help/cmake-2-8-docs.html#command:execute_process : "The execute_process command is a newer more powerful version of exec_program, but the old command h

Re: [CMake] INSTALL CODE using EXEC_PROGRAM with spaces in path

2011-03-11 Thread Tyler
I believe the canonical answer is to write the command line you wish to execute into a file and use install(SCRIPT ...) instead of install(CODE ...). tyler On Fri, Mar 11, 2011 at 7:14 AM, Urbach, Marcel [Rohmann GmbH] wrote: > Hi, > > I am using Windows 7 and I have tried to register my builded

[CMake] INSTALL CODE using EXEC_PROGRAM with spaces in path

2011-03-11 Thread Urbach, Marcel [Rohmann GmbH]
Hi, I am using Windows 7 and I have tried to register my builded dll files with regsvr32 after installing them. It works for paths without spaces. INSTALL( CODE "EXEC_PROGRAM( regsvr32 ARGS \"/s\" ARGS \"C:\\lib\\test.dll\" OUTPUT_VARIABLE POST_INST_OUT RETURN_VALUE POST_INST_RES )" )

Re: [CMake] How to change default target in solution?

2011-03-11 Thread aaron.meadows
You can't. The default target is stored in the .suo file. That file is generated by visual studio when it loads the solution file. The rules that Visual studio uses for chosing the default target are not published and don't seem to make a lot of sense. The reason that ALL_BUILD is marked as the

Re: [CMake] Find Library would not find the library

2011-03-11 Thread Michael Hertling
On 03/10/2011 12:25 AM, Andreas Pakulat wrote: > On 09.03.11 21:36:25, Ankur Handa wrote: >> I'm using find_library to find a library in a given directory but it has >> many different versions of this library listed as libcxcore.so, >> libcxcore.so.2.1 and libcxcore.so.2.1.0 I wrote a very simple

[CMake] Browser plugin bundle for Mac OSX

2011-03-11 Thread Gino
Good morning to everybody. I'm here to ask you some help, hints, or at least an hyperlink to some good documentation, on how create plugin bundles with CMake on MacOSX. Currently I'm able to obtain a plugin bundle with cmake, that simply doesn't work. So I thought it was the executable, and I too

[CMake] How to change default target in solution?

2011-03-11 Thread Anton Sibilev
Hello! By default ALL_BUILD is main target, how can I change 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: htt

[CMake] memoized build systems, opinions

2011-03-11 Thread David Manura
I've seen a small following in "memoized build systems" as an alternative to the traditional approach of building a dependency tree, but these projects are still emerging and its difficult finding information on this approach. Does anyone have real world experience of the strengths/weaknesses of t