Notes |
|
(0028681)
|
Eric NOULARD
|
2012-02-21 11:15
|
|
From algorithm described here:
Source/cmGlobalGenerator.cxx
lines 225-265
right before void cmGlobalGenerator::EnableLanguage
I would says that the multiple load is "normal"
1 for each enables languages (C and C++ may be)
1 other for ???
That said eCos.cmake is the only Platform/*.cmake file which is using
ADD_DEFINITION
$ cd Modules/Platform
$ grep ADD_DEFINITION *
eCos.cmake:ADD_DEFINITIONS(-D__ECOS__=1 -D__ECOS=1)
does ADD_DEFINITIONS belongs to a Platform file?
If this is the case
may be that call should be protected against multiple inclusion
with some guard VARIABLE like
if (NOT ECOS_CMAKE_INCLUDED)
ADD_DEFINITIONS(-D__ECOS__=1 -D__ECOS=1)
set(ECOS_CMAKE_INCLUDED 1)
endif(NOT ECOS_CMAKE_INCLUDED)
would this work in your case? |
|
|
(0028683)
|
Emmanuel Blot
|
2012-02-21 12:29
|
|
> does ADD_DEFINITIONS belongs to a Platform file?
I cant' tell :-)
> would this work in your case?
Indeed, it works fine, I just tested it. |
|
|
(0028684)
|
Emmanuel Blot
|
2012-02-21 12:29
|
|
> 1 other for ???
ASM-ATT I would say. |
|
|
(0028945)
|
Alex Neundorf
|
2012-03-20 17:17
|
|
Can you please give the attached eCos.cmake a try ?
It has an include-guard at the top and should also work.
Please let me know here whether it works for you or not.
Alex |
|
|
(0028973)
|
Alex Neundorf
|
2012-03-26 15:48
|
|
Did you already find the time to give the attached file a try ? |
|
|
(0028977)
|
Emmanuel Blot
|
2012-03-27 05:09
|
|
Sorry, I forgot. You are right to ping me back, I'll give a try today. |
|
|
(0028978)
|
Emmanuel Blot
|
2012-03-27 05:21
|
|
Hi Alex,
Yes it works, the __ECOS__ and __ECOS flags are now only defined once, and I saw no regression while building a typical eCos project.
Thanks,
Emmanuel. |
|
|
(0028992)
|
Alex Neundorf
|
2012-03-28 15:41
|
|
Merged into master, and fix confirmed by reporter.
|
|