[CMake] OSX xcodebuild not rebuilding objects?
Paul Smith
paul at mad-scientist.net
Thu May 14 17:24:16 EDT 2015
Has anyone else run into errors rebuilding objects using the Xcode
generator? I imagine it would be a bug in xcodebuild, not cmake. We've
been using incremental builds, rather than clean builds, for years with
cmake on GNU/Linux (make), OSX (Xcode), and Windows (MSVC) and this is
the first time I've ever seen this.
One of our C++ unit tests got a bus error on OSX and while debugging it
became clear that one of our object files was not rebuilt after a header
file had changed (obviously very bad).
Looking at the build directory, the object file was definitely NOT
rebuilt when it should have been: the object file's time-last-modified
was April 29, the object file's ".d" file contained the fully-qualified
path to the header file in question, and the time-last-modified on the
header file was May 12. The build log shows other object files being
rebuilt, but not this one. There's absolutely nothing special about
this file: it's just a standard C++ source file and appears in a list of
similar C++ files in my CMakeLists.txt file.
I've never seen this happen before, has anyone else run into it? This
makes me very concerned!
$ cmake --version
cmake version 3.1.0
$ xcodebuild -version
Xcode 6.2
Build version 6C131e
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.9.5
BuildVersion: 13F1066
More information about the CMake
mailing list