[CMake] custom compiler: remove space after CMAKE_LINK_LIBRARY_FILE_FLAG

2011-10-20 Thread Doug Crawford
I am creating a platform file for the Radisys OS9 embedded cross compiler.  The executable link line needs to look like: xcc source.o -fd=target -lmylib/mylib.l   I figured out that I needed to add this to my Generic_XCC.cmake platform file SET(CMAKE_LINK_LIBRARY_FILE_FLAG "-l")   but the problem

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
I think I found the issue. Deep inside one of the Microsoft Exchange LIB files that I link against my MFC project executable is the following (I copied this out of the text editor): -defaultlib:mfc40.lib -defaultlib:mfcs40.lib -defaultlib:msvcrt.lib -defaultlib:kernel32.lib -defaultlib:user32.lib

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
More updates. I generated my MFC project as normal through CMake and still have the mfc40.lib can't be found linker error. So what I did was remove 1 CPP file from the project at a time, clean, rebuild and see what different results I get. Well, once all of the MFC related CPP files (the app class

Re: [CMake] add_custom_command question

2011-10-20 Thread Michael Hertling
On 10/20/2011 08:23 PM, Łukasz Tasz wrote: >> add_custom_target(TARGET generator >>COMMAND touch aaa.cxx >>COMMENT generate file >> ) >> >> add_custom_command(OUTPUT aaa.cxx >>COMMAND echo "command" >>DEPENDS generator bar >> This does

Re: [CMake] Windows 8 and Visual Studio 2011 Developer Preview cannot open cmake-generated vcproj files

2011-10-20 Thread David Cole
On Tue, Oct 18, 2011 at 10:58 AM, Bill Hoffman wrote: > On 10/18/2011 2:42 AM, Andreas Pakulat wrote: > >>> Ideas on how to make this work? Other than ditching this experiment >>> alltogether that is? ;) >> >> Add a VS 2011 generator to CMake which generates the correct solution >> files and post

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Robert Dailey
I found out where I was going wrong based on how you guys said it isn't used by add_executable(). I was doing this before: set( CMAKE_MFC_FLAG 2 PARENT_SCOPE ) add_executable( ${project_name} WIN32 ${source} ) set( CMAKE_MFC_FLAG 0 PARENT_SCOPE ) I did this so that if I create any projects AFTER

[CMake] cmake, eclipse, and multiple projects

2011-10-20 Thread Dan Kegel
Where I work, a lot of people use Eclipse, a few people use Xcode, a few people use Visual Studio, and a few people use vi and the commandline. (I'm in the latter camp, and have only moderate familiarity with IDEs.) Each camp seems to have a different way of building the same code. Naturally, the t

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Robert Dailey
There isn't any way to do a trace from cmake gui is there? Maybe that's a separate feature request on its own :P I'll check out the trace and follow up with results. - Robert Dailey On Thu, Oct 20, 2011 at 4:16 PM, Bill Hoffman wrote: > On 10/20/2011 5:11 PM, Robert Dailey wrote: > >>

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread David Cole
Use --trace with the cmake command line, redirect that to a file, then search the file On Thu, Oct 20, 2011 at 5:11 PM, Robert Dailey wrote: > So I created a small project to attempt to reproduce this problem on a much > smaller scale, but it functioned as designed in that case. > It's only in my

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Bill Hoffman
On 10/20/2011 5:11 PM, Robert Dailey wrote: So I created a small project to attempt to reproduce this problem on a much smaller scale, but it functioned as designed in that case. It's only in my large, corporate project that this happens. Is there any way to dump a "scope stack" or call stack of

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Robert Dailey
So I created a small project to attempt to reproduce this problem on a much smaller scale, but it functioned as designed in that case. It's only in my large, corporate project that this happens. Is there any way to dump a "scope stack" or call stack of some sort in CMake? That way I can see what t

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Michael Hertling
On 10/20/2011 08:44 PM, Robert Dailey wrote: > On Thu, Oct 20, 2011 at 12:56 PM, Michael Hertling wrote: > >> On 10/20/2011 06:59 PM, Robert Dailey wrote: >>> Let me ask this, >>> >>> What would be the parent of a function located in the root CMakeLists >> file >>> but called from a subordinate CM

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
Those quotes do look suspicious but for some reason they work just fine in Cygwin. Basically I load vsvars32.bat into my cygwin environment, and I have modified the paths in that batch file to the "short path" format since our makefile build scripts do not play friendly with spaces in the file pat

[CMake] Problem with quotes in ExternalProject

2011-10-20 Thread Milutin Jovanović
Hi all, I am sorry for dragging you all back into the quote problem, but I've just spent 4 hours on ONE SET OF QUOTES!!! Sorry, had to get that out of the system. I promise no more. Any way, I am using ExternalProject, which downloads and builds couple of projects. The problem is on Windows, wher

Re: [CMake] CMake & MFC

2011-10-20 Thread David Cole
The quote placement look suspicious. Where are these coming from? Do you have quotes embedded in environment variable values? -I"C:/PROGRA~1/MICROS~1.NET/Vc7"/include -I"C:/PROGRA~1/MICROS~1.NET"/VC7/PlatformSDK/include -I"C:/PROGRA~1/MICROS~1.NET/Vc7"/atlmfc/include -I"C:/PROGRA~1/MICROS~1.NET/Vc

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
Also for reference, our original build system uses Cygwin and makefiles. Below I will paste the command line invoked to compile 1 source file in this MFC project as well as the link command. Also please note that when building through our original build system, which also uses VS2003, it successfu

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
I grepped everything possible, I found nothing related to mfc4. This is getting scary... Since I'm not a CMake developer or expert, can someone guide me with steps on how to debug this issue? If I need to debug CMake itself from source, that is acceptable but hopefully we don't need to start there

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Robert Dailey
On Thu, Oct 20, 2011 at 12:56 PM, Michael Hertling wrote: > On 10/20/2011 06:59 PM, Robert Dailey wrote: > > Let me ask this, > > > > What would be the parent of a function located in the root CMakeLists > file > > but called from a subordinate CMakeLists file? > > It's the subordinate CMakeLists.

Re: [CMake] add_custom_command question

2011-10-20 Thread Łukasz Tasz
> add_custom_target(TARGET generator >COMMAND touch aaa.cxx >COMMENT generate file > ) > > add_custom_command(OUTPUT aaa.cxx >COMMAND echo "command" >DEPENDS generator bar > This does not work^^^ >

Re: [CMake] add_custom_command question

2011-10-20 Thread Łukasz Tasz
Hi Michael, Hi All Thanks a lot for answer, I tried something else, let's assume that we have some output, then we are registering target which is dependend on ouptut - registered target is responsible to provide output in a global scope. I have other cmake lists, in which I have some targets tha

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Michael Hertling
On 10/20/2011 06:59 PM, Robert Dailey wrote: > Let me ask this, > > What would be the parent of a function located in the root CMakeLists file > but called from a subordinate CMakeLists file? It's the subordinate CMakeLists.txt file's parent, but what Michael probably aims at is that some variabl

[CMake] Java support - install with components

2011-10-20 Thread Allen D Byrne
I've upgraded my Java project to the latest 2.8.6 release. The only thing missing for me is to allow components on the install commands. I just did the following: In UseJava.cmake (same for INSTALL_JNI_SYMLINK): function(INSTALL_JAR _TARGET_NAME _DESTINATION) get_property(__FILES TA

[CMake] RES: Specify compiler flags for only one file

2011-10-20 Thread Renan Greinert
Thank you Alex! >set_source_files_properties(... COMPILE_FLAGS ... ) should do it. > >Alex On Wednesday 19 October 2011, Renan Greinert wrote: >> Hello everybody, >> >> >> >> I have a simple Project like this: >> >> set(PROJ_SOURCES >> >> main.cpp >> >> manager.cpp >> >>

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
I did this and it links just fine... hmmm. Let me grep my source tree for "mfc4" and see what I get. I really am running out of ideas, I don't know what else to look for. - Robert Dailey On Thu, Oct 20, 2011 at 11:46 AM, Bill Hoffman wrote: > On 10/20/2011 12:35 PM, Robert Dailey wrote:

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Robert Dailey
Let me ask this, What would be the parent of a function located in the root CMakeLists file but called from a subordinate CMakeLists file? - Robert Dailey On Thu, Oct 20, 2011 at 11:55 AM, Michael Wild wrote: > On 10/20/2011 05:41 PM, Robert Dailey wrote: > > On Thu, Oct 20, 2011 at 2

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Michael Wild
On 10/20/2011 05:41 PM, Robert Dailey wrote: > On Thu, Oct 20, 2011 at 2:36 AM, Rolf Eike Beer > wrote: > > > I have a function defined very high up in the directory tree at > the root > > CMakeLists file. Several levels below it, I have another > CMakeList

Re: [CMake] CMake & MFC

2011-10-20 Thread David Cole
Can you do a grep of your source tree for "mfc4" ?? We do not have any occurrences of "mfc4" anywhere in the CMake source tree... I do not think we generate anything that references any mfc libs even when you have the setting on. We just let Visual Studio do it's thing... On Thu, Oct 20, 2011 at

Re: [CMake] CMake & MFC

2011-10-20 Thread Bill Hoffman
On 10/20/2011 12:35 PM, Robert Dailey wrote: I just tried with VS2008 and I get the same: fatal error LNK1104: cannot open file 'mfc40.lib' Also I created a default MFC application using the new project wizard in VS2008 and it compiled & linked just fine, so it seems like maybe this is a CM

Re: [CMake] CMakeEd has been updated

2011-10-20 Thread James Sutherland
That did it - thanks! By the way, is there any plan to add auto-indenting options to this plugin? James On Wed, Oct 19, 2011 at 5:11 PM, Michael Jackson < mike.jack...@bluequartz.net> wrote: > Looks like your update site has a typo in it. The update sites are: > > http://master.dl.sourceforge.n

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Robert Dailey
I'm generating for VS2003 in this case. Also with the searching I did I was not able to find an existing bug report related to this issue. - Robert Dailey On Thu, Oct 20, 2011 at 10:43 AM, David Cole wrote: > Are you using VS10? > > Is it this already known problem? > > http://public.k

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
I just tried with VS2008 and I get the same: fatal error LNK1104: cannot open file 'mfc40.lib' Also I created a default MFC application using the new project wizard in VS2008 and it compiled & linked just fine, so it seems like maybe this is a CMake issue? - Robert Dailey On Thu, Oc

Re: [CMake] CMake & MFC

2011-10-20 Thread David Cole
Is it possible to try VS 2005, 2008 or 2010 here? I assume building an MFC app without CMake works on this system...? On Thu, Oct 20, 2011 at 11:43 AM, Robert Dailey wrote: > Going to bump this thread in hopes I get a more urgent response. I'm very > much blocked on this until I can figure out

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread David Cole
Are you using VS10? Is it this already known problem? http://public.kitware.com/Bug/view.php?id=11224 On Thu, Oct 20, 2011 at 11:41 AM, Robert Dailey wrote: > On Thu, Oct 20, 2011 at 2:36 AM, Rolf Eike Beer wrote: >> >> > I have a function defined very high up in the directory tree at the roo

Re: [CMake] tried to use pkgcpnfig to compile my project

2011-10-20 Thread Alexander Neundorf
On Thursday 20 October 2011, David Boesner wrote: > That worked. > Thank you very, very much > > Regards > > David You're welcome :-) Alex P.S. and please always keep the mailing list on CC -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/open

Re: [CMake] CDT generator - CDT 8.0.1 [Visual Studio compiler support]

2011-10-20 Thread Alexander Neundorf
On Thursday 20 October 2011, Nicholas Yue wrote: > 2011/10/20 Alexander Neundorf > > > On Wednesday 19 October 2011, Nicholas Yue wrote: > > > On 19/10/11 10:20 AM, Alexander Neundorf wrote: > > > > Yes, this is currently only implemented for gcc and for the Intel > > > > compiler. > > > > > > I

Re: [CMake] CMake & MFC

2011-10-20 Thread Robert Dailey
Going to bump this thread in hopes I get a more urgent response. I'm very much blocked on this until I can figure out why my project is trying to find mfc40.lib when I only have mfc71.lib on my system. I looked through the C++ code for #pragma comment(lib, ... ) directives, I found none. I looked

Re: [CMake] CDT - source file references

2011-10-20 Thread Alexander Neundorf
On Thursday 20 October 2011, Nicholas Yue wrote: > Found the answer to my question here: > > http://www.vtk.org/Wiki/Eclipse_CDT4_Generator There should be linked folders to the source directory and to the subproject directories in the "Project Explorer" view. Are they there for you ? The subpr

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Robert Dailey
On Thu, Oct 20, 2011 at 2:36 AM, Rolf Eike Beer wrote: > > I have a function defined very high up in the directory tree at the root > > CMakeLists file. Several levels below it, I have another CMakeLists file > > that I call that function from. > > > > The function sets CMAKE_MFC_FLAG to 2. I not

Re: [CMake] getting all the function names

2011-10-20 Thread Andrea Crotti
Thanks a lot the completion works quite nicely... Anyway something brutal like this below already would work if someone is using auto-complete. The problem is that variables and functions depend on the version, in theory is possible to get the list of completions with a shell script but - it migh

Re: [CMake] getting all the function names

2011-10-20 Thread Eric Noulard
2011/10/20 Rolf Eike Beer : >> I'm starting to use cmake and I will have to rely on it pretty much in >> the future. >> >> I'm a bit overwhelmed by the quantity of variables / functions, is there >> a way >> to get an automatic list of all of them? >> >> It would be nice to improve the cmake-mode.e

Re: [CMake] getting all the function names

2011-10-20 Thread Rolf Eike Beer
> I'm starting to use cmake and I will have to rely on it pretty much in > the future. > > I'm a bit overwhelmed by the quantity of variables / functions, is there > a way > to get an automatic list of all of them? > > It would be nice to improve the cmake-mode.el (for emacs) to recognise > as much

[CMake] getting all the function names

2011-10-20 Thread Andrea Crotti
I'm starting to use cmake and I will have to rely on it pretty much in the future. I'm a bit overwhelmed by the quantity of variables / functions, is there a way to get an automatic list of all of them? It would be nice to improve the cmake-mode.el (for emacs) to recognise as much as possibl

Re: [CMake] "Empty" ./CMakeFiles/Makefile2 - how to proceed?

2011-10-20 Thread Andreas Pakulat
On 20.10.11 14:12:10, Alastair McKinstry wrote: > On 2011-10-20 13:43, Eric Noulard wrote: > >2011/10/20 Alastair McKinstry: > >>I'm building a debian package, CDAT. The latest version 6.0.alpha uses CMAKE > >>to build, rather than configure. The trouble is that CMake doesn't build. It > >>doesn't

Re: [CMake] "Empty" ./CMakeFiles/Makefile2 - how to proceed?

2011-10-20 Thread Alastair McKinstry
On 2011-10-20 13:43, Eric Noulard wrote: 2011/10/20 Alastair McKinstry: I'm building a debian package, CDAT. The latest version 6.0.alpha uses CMAKE to build, rather than configure. The trouble is that CMake doesn't build. It doesn't even fail. $ mkdir build $ cd build $ cmake .. ()-- Configuri

Re: [CMake] "Empty" ./CMakeFiles/Makefile2 - how to proceed?

2011-10-20 Thread Eric Noulard
2011/10/20 Alastair McKinstry : > > I'm building a debian package, CDAT. The latest version 6.0.alpha uses CMAKE > to build, rather than configure. The trouble is that CMake doesn't build. It > doesn't even fail. > > $ mkdir build > $ cd build > $ cmake .. > ()-- Configuring done > -- Generating do

Re: [CMake] add_custom_command question

2011-10-20 Thread Michael Hertling
On 10/20/2011 12:37 PM, Łukasz Tasz wrote: > Hi all, > > In my cmake project I have few commands that are creating outputs. > > But Unfortunately those outputs are used across many directories. > > So my question is what's the real scope of output_command? only > Current_CmakeLists.txt? Yes, a

Re: [CMake] XCode workspace with projects and Visual Studio solution with projects

2011-10-20 Thread Michael Jackson
Yes you will get a top level Solution with projects. No you will not get that in Xcode. ___ Mike Jackson www.bluequartz.net Principal Software Engineer mike.jack...@bluequartz.net BlueQuartz Software

[CMake] XCode workspace with projects and Visual Studio solution with projects

2011-10-20 Thread Daniel Dekkers
Hi, I was wondering, if I generate for Visual Studio, and do PROjECT(...) calls in nested CMakeLists.txt files, I get a top level solution with separate projects in it (exes and libs). But the XCode generator doesn't create a top level workspace (with separate projects in it) but a single proje

[CMake] add_custom_command question

2011-10-20 Thread Łukasz Tasz
Hi all, In my cmake project I have few commands that are creating outputs. But Unfortunately those outputs are used across many directories. So my question is what's the real scope of output_command? only Current_CmakeLists.txt? Can I somehow make make_target that is creating output registered i

[CMake] "Empty" ./CMakeFiles/Makefile2 - how to proceed?

2011-10-20 Thread Alastair McKinstry
I'm building a debian package, CDAT . The latest version 6.0.alpha uses CMAKE to build, rather than configure. The trouble is that CMake doesn't build. It doesn't even fail. $ mkdir build $ cd build $ cmake .. ()-- Configuring done -- Generating done -- Build fi

Re: [CMake] Xcode4 and OpenMP

2011-10-20 Thread Daniel Dekkers
Shouldn't it be SET_TARGET_PROPERTIES( ${TARGET} PROPERTIES XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT YES )? On Oct 19, 2011, at 6:15 PM, Kieran Parsons wrote: > I am having difficulty with enabling OpenMP on Xcode 4.0.2 (cmake 2.8.6). I > need to manually set the "Enable OpenMP support" build opti

Re: [CMake] CMAKE_MFC_FLAG not working in functions

2011-10-20 Thread Rolf Eike Beer
> I have a function defined very high up in the directory tree at the root > CMakeLists file. Several levels below it, I have another CMakeLists file > that I call that function from. > > The function sets CMAKE_MFC_FLAG to 2. I notice that this flag gets > ignored > when it is set inside of the fu