View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014018CMakeModulespublic2013-03-15 09:492016-06-10 14:31
Reporterluc.touraille 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0014018: SelectLibraryConfigurations wrongly set basename_LIBRARY
DescriptionWhen calling select_library_configurations( basename ) when basename_LIBRARY is already in cache, the macro appends basename_LIBRARY to itself. The cache variable is not modified, but subsequent uses of basename_LIBRARY can be problematic.
Steps To Reproduce1. Create a CMakeLists.txt that uses select_library_configurations and uses the lib_LIBRARY variable afterwards, like this one (also attached):

[code]cmake_minimum_required(VERSION 2.8)

include( SelectLibraryConfigurations )

set( FOO_LIBRARY_RELEASE foo )
set( FOO_LIBRARY_DEBUG foo_d )
set( CMAKE_BUILD_TYPE Release )

select_library_configurations( FOO )

message( STATUS "FOO_LIBRARY = ${FOO_LIBRARY}" )[/code]

2. Run cmake twice.

[code]> cmake .
[...]
-- FOO_LIBRARY = optimized;foo;debug;foo_d
[...]
> cmake .
[...]
-- FOO_LIBRARY = optimized;foo;debug;foo_d;optimized;foo;debug;foo_d
[...][/code]
Additional InformationThe issue can be resolved by using a temporary variable for building the list instead of manipulating basename_LIBRARY directly.
TagsNo tags attached.
Attached Filestxt file icon CMakeLists.txt [^] (268 bytes) 2013-03-15 09:49 [Show Content]

 Relationships

  Notes
(0042250)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2013-03-15 09:49 luc.touraille New Issue
2013-03-15 09:49 luc.touraille File Added: CMakeLists.txt
2016-06-10 14:28 Kitware Robot Note Added: 0042250
2016-06-10 14:28 Kitware Robot Status new => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team