[cmake-developers] [CMake 0012558]: ADD_LIBRARY should have an option to silence the warning if no source files are given
Mantis Bug Tracker
mantis at public.kitware.com
Fri Nov 4 12:06:08 EDT 2011
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=12558
======================================================================
Reported By: Gert Wollny
Assigned To:
======================================================================
Project: CMake
Issue ID: 12558
Category: CMake
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-11-04 12:06 EDT
Last Modified: 2011-11-04 12:06 EDT
======================================================================
Summary: ADD_LIBRARY should have an option to silence the
warning if no source files are given
Description:
Sometimes 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 Reproduce:
create an entry in CMakeLists.txt
ADD_LIBRARY(name MODULE)
or similar.
Additional Information:
Attached is a patch against v2.8.6 that does provide a flag NO_SOURCE_FILES that
informs cmake that no warning should be emitted.
======================================================================
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
======================================================================
More information about the cmake-developers
mailing list