View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011674CMakeCMakepublic2011-01-10 08:332011-01-12 08:16
ReporterHarald Pohl 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformIntelOSWindowsOS VersionXP
Product VersionCMake-2-8 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0011674: 'CMakeCXXInformation.cmake' always overrides 'CMAKE_CXX_ARCHIVE_CREATE'
DescriptionI 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)










TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0024530)
Brad King (manager)
2011-01-10 10:01

Fixed, thanks:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2d73c93 [^]

 Issue History
Date Modified Username Field Change
2011-01-10 08:33 Harald Pohl New Issue
2011-01-10 10:00 Brad King Assigned To => Brad King
2011-01-10 10:00 Brad King Status new => assigned
2011-01-10 10:01 Brad King Note Added: 0024530
2011-01-10 10:01 Brad King Status assigned => closed
2011-01-10 10:01 Brad King Resolution open => fixed
2011-01-12 08:16 David Cole Fixed in Version => CMake 2.8.4
2011-01-12 08:16 David Cole Target Version => CMake 2.8.4


Copyright © 2000 - 2018 MantisBT Team