MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015666 | CMake | (No Category) | public | 2015-07-28 05:56 | 2016-03-07 09:12 |
Reporter | Nils Gladitz | ||||
Assigned To | Nils Gladitz | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | OS Version | ||
Product Version | CMake 3.3 | ||||
Target Version | CMake 3.4 | Fixed in Version | CMake 3.4 | ||
Summary | 0015666: Ninja may unnecessarily relink on windows | ||||
Description | I have the following windows specific test case: cmake_minimum_required(VERSION 3.3) project(Foo CXX) if(NOT EXISTS test.cpp) file(WRITE test.cpp "__declspec(dllexport) void foo() {}") endif() add_custom_target(touch COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/test.cpp ) add_library(foo SHARED test.cpp) | ||||
Steps To Reproduce | I configured the given test project with the "Ninja" generator from a "Visual Studio 2013 (x64)" environment. 1. ninja # builds the project as expected 2. ninja # outputs "ninja: no work to do." as expected 3. ninja touch # touches test.cpp 4. ninja # recompiles and relinks as expected 5-n. ninja # unexpectedly relinks; expected is "ninja: no work to do." | ||||
Additional Information | It looks like the relink happens because the linker updates foo.dll but does not touch foo.lib. Which leads to (ninja -d explain): ninja explain: output foo.lib older than most recent input CMakeFiles/foo.dir/test.cpp.obj (459779794 vs 459780205) ninja explain: foo.dll is dirty [1/1] Linking CXX shared library foo.dll | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-07-28 05:56 | Nils Gladitz | New Issue | |||
2015-07-28 08:42 | Brad King | Note Added: 0039174 | |||
2015-07-28 08:54 | Nils Gladitz | Note Added: 0039175 | |||
2015-07-28 09:10 | Brad King | Note Added: 0039176 | |||
2015-07-28 09:14 | Nils Gladitz | Note Added: 0039177 | |||
2015-07-30 06:40 | Nils Gladitz | Note Added: 0039191 | |||
2015-07-30 06:40 | Nils Gladitz | Status | new => closed | ||
2015-07-30 06:40 | Nils Gladitz | Assigned To | => Nils Gladitz | ||
2015-07-30 06:40 | Nils Gladitz | Resolution | open => fixed | ||
2015-07-30 06:40 | Nils Gladitz | Fixed in Version | => CMake 3.4 | ||
2015-07-30 08:48 | Brad King | Note Added: 0039192 | |||
2015-07-30 08:48 | Brad King | Status | closed => resolved | ||
2015-07-30 08:48 | Brad King | Target Version | => CMake 3.4 | ||
2015-07-30 08:58 | Nils Gladitz | Note Added: 0039194 | |||
2016-03-07 09:12 | Robert Maynard | Note Added: 0040605 | |||
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|