Re: [PATCH 5/8] cmake: support for testing git when building out of the source tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you are adding a new test script you will have re-configure.
Even in automake you are expected to do this, unless you have a glob
pattern in Makefile.in somewhere.

On Sat, Apr 25, 2020 at 4:39 AM Danh Doan <congdanhqx@xxxxxxxxx> wrote:
>
> On 2020-04-25 03:02:49+0530, Sibi Siddharthan <sibisiddharthan.github@xxxxxxxxx> wrote:
> > > >  file(GLOB test_scipts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")
> > >
> > > Remember cmake won't be re-run if nothing was changed in CMakeList.txt
> > > If I only change some code, and I decided the change I make should be
> > > tested by a-new-and-independent-test-script.
> > > I need to re-run cmake manually! I don't like it, at all.
> > >
> >
> > No you don't have re-run CMake.
>
> Yes, you have to re-run CMake.
> https://cmake.org/cmake/help/v3.14/command/file.html#glob
>
> > Note
> >
> > We do not recommend using GLOB to collect a list of source files
> > from your source tree. If no CMakeLists.txt file changes when
> > a source is added or removed then the generated build system cannot
> > know when to ask CMake to regenerate. The CONFIGURE_DEPENDS flag may
> > not work reliably on all generators, or if a new generator is added
> > in the future that cannot support it, projects using it will be
> > stuck. Even if CONFIGURE_DEPENDS works reliably, there is still
> > a cost to perform the check on every rebuild.
>
> * Run CMake now.
> * Don't touch anything
> * Create new test-script, let's say t9904-just-for-cmake.sh
>
> * Check if it's run or not, I bet the answer is not
>

The new test script is not added to list of test scripts.
So yes, you will have to re-run CMake.
A reconfigure in CMake is going to take less than 2 seconds, not like
automake which can take as long as the initial configure itself.

> Anyway, Junio said NO, I don't need to be a CMake hater here, anymore.
>
> --
> Danh

Thank You,
Sibi Siddharthan



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux