[cmake-developers] CMake 3.1 regression with incremental builds ?

David Cole DLRdave at aol.com
Fri Nov 7 07:24:45 EST 2014


I just looked at the diff, not the surrounding code, so forgive the
question if it's obvious when inspecting the code...... but here's a
question about your change before we push it into RC 2:

Is "objectSources" guaranteed to contain the same set of objects as "mapping"?

If so, I wonder why the code calls:
cmSourceFile* sf = context->Makefile->GetOrCreateSource(objFile, true);

instead of simply using "map_it->first"?

i.e. -- isn't the GetOrCreateSourceFile call superfluous if you have a
pointer to the source file object in the iterator...? Or is it a
"const" thing?


Curious,
David C.


On Thu, Nov 6, 2014 at 11:09 PM, <clinton at elemtech.com> wrote:
>
> I've put in a fix for this.
> 580b668d genex: Preserve order while evaluating TARGET_OBJECTS
>
> Can we put this in RC 2?
>
> Clint
>
> ----- Original Message -----
> >
> > Using the netcdf project
> > ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.2.tar.gz
> >
> > I see a problem with incremental builds doing a relink of libraries.  Within
> > my project, this leads to unnecessarily relinking of many executables every
> > time I run cmake.
> >
> > For example:
> >
> > tar zxf netcdf-4.3.2.tar.gz
> > cd netcdf-4.3.2
> > mkdir build
> > cd build
> > cmake ../
> > git init .
> > git add .
> > git commit -m"init"
> > cmake ../
> > git diff
> >
> >
> > These files have modifications in them which will lead to relinking.
> > liblib/CMakeFiles/netcdf.dir/build.make
> > liblib/CMakeFiles/netcdf.dir/link.txt
> >
> > I see object files listed in a random order.  Perhaps there is a std::set
> > used
> > somewhere in CMake or something.
> >
> > I do not see this behavior with CMake 3.0.2.
> >
> > Clint
> > --
> >
> > Powered by www.kitware.com
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Kitware offers various services to support the CMake community. For more
> > information on each offering, please visit:
> >
> > CMake Support: http://cmake.org/cmake/help/support.html
> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
> > CMake Training Courses: http://cmake.org/cmake/help/training.html
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/cmake-developers
> >
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers


More information about the cmake-developers mailing list