Utils.C newer than Utils,which makes gmake try to rebuild Utils from Utils.C during the compilation of my own code
I'm developing a website using wt3.2.3.
In my code , I used the Wt::Utils::md5 method.
The first time I added the Utils header into my code , it compiled successfully.
Then , I modified some other code in my project. And compiled my project the second time. This time , make gave the following command , trying to compile Utils from Utils.C :
g /usr/include/Wt/Utils.C -o /usr/include/Wt/Utils (sorry I didn't copy the original output).
Which failed . Because Utils.C included DomElement.h , which lies in wt's src directory but not installed into /usr/include . Well , that's not the problem.
I think that Utils.C is compiled when I was installing wt itself. And not need to be compiled any more later.
Then why it got compiled again? I found that the modified time of Utils.C is 2012.10.12.21:56 , but the modified time of Utils is 2012.8.10.18:43 . So Utils.C is newer , and gmake tried to compile it again.
After "touch"ing Utils manually. The problem is gone.
So why is Utils older than Utils.C ? Is that a bug of wt's cmake script or something else ?
Updated by 太极美术工程狮 狮长 over 7 years ago
Ah, I got it.
Utils.C is not a dependency of Utils at all. They are just the cpp file with it's header file.
But I use qmake as the project manager,which generated the dependency by file name automatically.It tried to compile Utils.C as the target Utils.
Anyhow , I think Utils.C should not be installed during the installation step of wt .