View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012558CMakeCMakepublic2011-11-04 12:062016-06-10 14:31
ReporterGert Wollny 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 2.8.6 
Target VersionFixed in Version 
Summary0012558: ADD_LIBRARY should have an option to silence the warning if no source files are given
DescriptionSometimes it may be of interest to create a shared library by only linking other libraries without adding additional source files. If one does this, cmake omits a warning. It should be possible to add a flag to the ADD_LIBRARY command that informs cmake that the the user knows what he is doing.

Example use case: in a plug-in framework I want to write tests that check the functionality of the plug-in without having to go through the plug-in loading framework. Therefore, a static library is created that contains the complete plug-in code and the test program links against this static library.
Then, to create the dynamically loadable plug-in I create such a sourceless library that just relinks everything without adding additional code.
Steps To Reproducecreate an entry in CMakeLists.txt
ADD_LIBRARY(name MODULE)
or similar.
Additional InformationAttached is a patch against v2.8.6 that does provide a flag NO_SOURCE_FILES that informs cmake that no warning should be emitted.


TagsNo tags attached.
Attached Filespatch file icon cmake-2.8.6-nosourcelib.patch [^] (1,271 bytes) 2011-11-04 12:06 [Show Content]

 Relationships

  Notes
(0028923)
Gert Wollny (reporter)
2012-03-16 14:23

Alternatively, one could provide a policy to silence the warning. This would have the advantage that older versions of cmake could still process the CMakeLists.txt file. I don't have a patch for this , because it means touching more code, and I don't want to dig too deep to find out how policies are handled.

The disadvantage of a policy would be that by turning it off, a user might not see the warning when it actually makes sense.
(0030380)
David Cole (manager)
2012-08-11 21:35

Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0041927)
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
2011-11-04 12:06 Gert Wollny New Issue
2011-11-04 12:06 Gert Wollny File Added: cmake-2.8.6-nosourcelib.patch
2012-03-16 14:23 Gert Wollny Note Added: 0028923
2012-08-11 21:35 David Cole Status new => backlog
2012-08-11 21:35 David Cole Note Added: 0030380
2016-06-10 14:28 Kitware Robot Note Added: 0041927
2016-06-10 14:28 Kitware Robot Status backlog => 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