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                                    
======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to