The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=11674 
====================================================================== 
Reported By:                Harald Pohl
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11674
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-01-10 08:33 EST
Last Modified:              2011-01-10 08:33 EST
====================================================================== 
Summary:                    'CMakeCXXInformation.cmake' always overrides
'CMAKE_CXX_ARCHIVE_CREATE'
Description: 
I tried to use cmake for my ARM Keil CXX project, which is seperated into a very
large library and a application project. First, everything works fine, but the
source file count of my library increases that much, that windows was unable to
handle the whole link command in one line. Therefore I change my compiler
definition by unsetting 'CMAKE_CXX_CREATE_STATIC_LIBRARY' and setting 
  CMAKE_C_ARCHIVE_CREATE, 
  CMAKE_C_ARCHIVE_APPEND,
  CMAKE_CXX_ARCHIVE_CREATE,
  CMAKE_CXX_ARCHIVE_APPEND

But all my values will be always overwritten by 'CMakeCInformation.cmake' or
'CMakeCXXInformation.cmake' by:

167: SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
168: SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r  <TARGET> <LINK_FLAGS> <OBJECTS>")
169: SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")

All other variables, which are set in this file, are checked for content first,
exept these three. Is there a different way to prefent this? And if it's a bug,
I suggest the following solution:

IF(NOT CMAKE_C_ARCHIVE_CREATE)
  SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
ENDIF(NOT CMAKE_C_ARCHIVE_CREATE)

IF(NOT CMAKE_C_ARCHIVE_APPEND)
  SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r  <TARGET> <LINK_FLAGS> <OBJECTS>")
ENDIF(NOT CMAKE_C_ARCHIVE_APPEND)

IF(NOT CMAKE_C_ARCHIVE_FINISH)
  SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
ENDIF(NOT CMAKE_C_ARCHIVE_FINISH)











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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-10 08:33 Harald Pohl    New Issue                                    
======================================================================

_______________________________________________
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to