Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread Hendrik Sattler
Am Freitag 15 Mai 2009 17:05:58 schrieb ankit jain: [...] The following works with VS2008 without any problem as expected: CMakeLists.txt: -- project(var C) add_executable(var sub/main.c var.c var.h) --

Re: [CMake] macro/function and ARGN weird behavior

2009-05-15 Thread Nicolas Desprès
Thx for the explanation David. I will take care of it. Cheers, 2009/5/15 David Cole : > The other difference (besides scoping) between a macro and a function > explains the behavior you are seeing: > The parameters to a function are automatically local variables inside the > function scope. The p

Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread ankit jain
2009/5/15 > ankit jain wrote: > > > My source tree structure is: > > Main_folder > >.. Ident.c > >..folder1 > >f11.c > >f12.c > > [...] > > > > Now I am able to get all the source files from all the folders. but > the > > problem is that all folder source files uses one variable

[CMake] FindPackageHandleStandardArgs.cmake patch

2009-05-15 Thread Marcel Loose
Hi all, I think the interface of find_package_handle_standard_args() is a bit counter-intuitive. Why should it matter to the (ignorant) user that list-variables are treated different from "ordinary" values. That doesn't make sense IMHO (see my thread "How to use FindPackageHandleStandardArgs" on

Re: [CMake] macro/function and ARGN weird behavior

2009-05-15 Thread David Cole
The other difference (besides scoping) between a macro and a function explains the behavior you are seeing: The parameters to a function are automatically local variables inside the function scope. The parameters to a macro are not actually variables. They are merely expanded *as if* they were vari

Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread David . Karr
ankit jain wrote: > My source tree structure is: > Main_folder >.. Ident.c >..folder1 >f11.c >f12.c > [...] > > Now I am able to get all the source files from all the folders. but the > problem is that all folder source files uses one variable v1 of this Ident.c > file.. > > So th

[CMake] macro/function and ARGN weird behavior

2009-05-15 Thread Nicolas Desprès
Hi there, I'm experiencing a weird behavior with cmake 2.6.4 (Win32) playing with macro, function and ARGN. === script function(print_var) foreach(i ${ARGV}) message("${i}='${${i}}'") endforeach(i) endfunction(print_var) macro(print_var_macro) foreach(i ${ARGV}) message("macro ${i}

[CMake] unable to include a source file for all sub directories

2009-05-15 Thread ankit jain
-- Forwarded message -- From: ankit jain Date: 2009/5/15 Subject: Re: [CMake] unable to include a source file for all sub directories To: Hendrik Sattler 2009/5/15 Hendrik Sattler > Zitat von ankit jain : > >> Now all files iam getting from folder1 and folder2 and objects of

Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread Hendrik Sattler
Zitat von ankit jain : Now all files iam getting from folder1 and folder2 and objects of all files including Ident.c is created... But while linking f11.obj f12.obj f21.obj f22.obj all show error undefined symbol: char *v1 where Ident .c contains.. char v1[]="Hello"; If you want a pointer, de

Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread ankit jain
2009/5/15 Hendrik Sattler > Zitat von ankit jain : > >> Linker error for many objects files that have created >> > > So either the object file that contains the symbol is not part of your link > command or you have a coding error. > Since you release neither an example nor further information, yo

Re: [CMake] Masm support for Visual Studio generator

2009-05-15 Thread Dmitry Bely
On Thu, May 14, 2009 at 11:16 PM, Alexander Neundorf wrote: > On Thursday 14 May 2009, Dmitry Bely wrote: >> Is it expected to work in Cmake 2.6.4? There is no problem with nmake >> generator but in Visual Studio all .asm files have an empty custom >> build command line. > > I think nobody has tri

Re: [CMake] Configuration environment variable for VS

2009-05-15 Thread David Cole
If you use "${CMAKE_CFG_INTDIR}" in a custom command it should show up as $(Config) in the generated VS vcproj files... Does this do what you want? add_custom_command(${OUTPUT_FILE} COMMAND ${CMAKE_COMMAND} ARGS -DCONFIG:STRING=${CMAKE_CFG_INTDIR} -P "${my_custom_script}" ) For makefile based

Re: [CMake] How to use FindPackageHandleStandardArgs

2009-05-15 Thread Marcel Loose
Hi all, On second thought, I think the interface of find_package_handle_standard_args() is a bit counter-intuitive. Why should it matter to the (ignorant) user that list-variables are treated different from "ordinary" values. That doesn't make sense IMHO. I've taken the time to rewrite find_packa

Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread Hendrik Sattler
Zitat von ankit jain : Linker error for many objects files that have created So either the object file that contains the symbol is not part of your link command or you have a coding error. Since you release neither an example nor further information, you will probably not get any other answ

[CMake] unable to include a source file for all sub directories

2009-05-15 Thread ankit jain
-- Forwarded message -- From: ankit jain Date: 2009/5/15 Subject: Re: [CMake] unable to include a source file for all sub directories To: Hendrik Sattler 2009/5/15 Hendrik Sattler > Zitat von ankit jain : > >> If suppose 5 files are there in one folder and each file uses so

Re: [CMake] calling a macro from add_custom_target [w as "add_custom_target / add_definitions cache issues" ]

2009-05-15 Thread Reto Glauser
On Thu, 14 May 2009 07:49:34 -0700, Tyler Roscoe wrote: > It's hard to say what's wrong with your custom_target/macro workflow > without seeing some CMakeLists code. > > I would solve this problem a different way: put #define VERSION whatever > into a header, include that header from a source fil

Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread Hendrik Sattler
Zitat von ankit jain : If suppose 5 files are there in one folder and each file uses some functions form other file in the same folder and when ur creating library then there is no problem.. Issue is if one folder file uses another file which is in diff. folder or in its parent folder then crea

[CMake] unable to include a source file for all sub directories

2009-05-15 Thread ankit jain
-- Forwarded message -- From: ankit jain Date: 2009/5/15 Subject: Re: [CMake] unable to include a source file for all sub directories To: Hendrik Sattler 2009/5/15 Hendrik Sattler Zitat von ankit jain : > >> Now I am able to get all the source files from all the folders. but

Re: [CMake] unable to include a source file for all sub directories

2009-05-15 Thread Hendrik Sattler
Zitat von ankit jain : Now I am able to get all the source files from all the folders. but the problem is that all folder source files uses one variable v1 of this Ident.c file.. So the error iam getting while building the library is : unresolved external symbol: v1 (iam working on windows VC++