[cmake-developers] [CMake 0012987]: Multiple redefinitions with cross compilation for eCos

Mantis Bug Tracker mantis at public.kitware.com
Tue Feb 21 09:59:46 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12987 
====================================================================== 
Reported By:                Emmanuel Blot
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12987
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   low
Status:                     new
====================================================================== 
Date Submitted:             2012-02-21 09:59 EST
Last Modified:              2012-02-21 09:59 EST
====================================================================== 
Summary:                    Multiple redefinitions with cross compilation for
eCos
Description: 
Using the following sequence to enable eCos cross-compilation (from any host):

INCLUDE (CMakeForceCompiler)
SET (CMAKE_SYSTEM_NAME eCos)
CMAKE_FORCE_C_COMPILER (arm-eabi-gcc GNU)
CMAKE_FORCE_CXX_COMPILER (arm-eabi-gcc GNU)

whenever the PROJECT() command is invoked, 
the file Modules/Platform/eCos.cmake is parsed and "executed" several times (3
times on my current configuration).

The net result is that line 45
ADD_DEFINITIONS(-D__ECOS__=1 -D__ECOS=1)
is executed 3 times, and the definitions are appended to each other.

Running CMake with the VERBOSE flag enables shows that the command line is
filled in with the same definitions:
arm-eabi-gcc  -D__ECOS__=1 -D__ECOS=1 -D__ECOS__=1 -D__ECOS=1 -D__ECOS__=1
-D__ECOS=1 ....

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-02-21 09:59 Emmanuel Blot  New Issue                                    
======================================================================




More information about the cmake-developers mailing list