diff options
| author | Brad King <brad.king@kitware.com> | 2014-07-02 15:38:10 -0400 |
|---|---|---|
| committer | Brad King <brad.king@kitware.com> | 2014-07-09 09:43:42 -0400 |
| commit | 2c470b775ab54f565383c95200d16dc42d94fe17 (patch) | |
| tree | 16072279bce09969004c90ea4dc55384c8265cf0 /Tests/RunCMake/ObjectLibrary | |
| parent | de4f3e2c82a92a7dfc6305a09cc32d9d5c6e8c34 (diff) | |
| download | cmake-2c470b775ab54f565383c95200d16dc42d94fe17.tar.gz | |
add_library: Allow arbitrary non-linked sources in OBJECT libraries
Loosen this restriction on OBJECT libraries to allow source files of any
name to be generated by custom commands or listed for reference in IDE
projects so long as they would not affect linking of a normal library.
Update the rejection message to be more specific about the looser
restriction.
Extend the ObjectLibrary test to cover a ".cmake" file generated by a
custom command in an OBJECT library.
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary')
| -rw-r--r-- | Tests/RunCMake/ObjectLibrary/BadObjSource1-stderr.txt | 3 | ||||
| -rw-r--r-- | Tests/RunCMake/ObjectLibrary/BadObjSource2-stderr.txt | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/BadObjSource1-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadObjSource1-stderr.txt index b31225b488..a09552b763 100644 --- a/Tests/RunCMake/ObjectLibrary/BadObjSource1-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/BadObjSource1-stderr.txt @@ -3,6 +3,7 @@ CMake Error at BadObjSource1.cmake:1 \(add_library\): bad.def - but may contain only headers and sources that compile. + but may contain only sources that compile, header files, and other files + that would not affect linking of a normal library. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/ObjectLibrary/BadObjSource2-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadObjSource2-stderr.txt index 906cf0b642..b91ffd0682 100644 --- a/Tests/RunCMake/ObjectLibrary/BadObjSource2-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/BadObjSource2-stderr.txt @@ -3,6 +3,7 @@ CMake Error at BadObjSource2.cmake:1 \(add_library\): bad.obj - but may contain only headers and sources that compile. + but may contain only sources that compile, header files, and other files + that would not affect linking of a normal library. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) |
