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)
--
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
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
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
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
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
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}
-- 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
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
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
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
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
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
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
-- 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
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
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
-- 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
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++
19 matches
Mail list logo