From: Igor Munkin <imun@tarantool.org> To: Olga Arkhangelskaia <arkholga@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH] cmake: set CMP0037 policy to NEW by default Date: Tue, 26 May 2020 11:59:07 +0300 [thread overview] Message-ID: <20200526085907.GJ5455@tarantool.org> (raw) In-Reply-To: <85045cdc-ff4e-f1a1-7fb4-dbe67bb38160@tarantool.org> Olya, Thanks for the patch! Sorry for nitpicking, but I still have several comments. On 25.05.20, Olga Arkhangelskaia wrote: > > Igor, I have fixed nits in commit message. Sorry for that. I have lost > > somewhere line from vimrc with spellchecker =( > > Moreover, I left warning and old behaviour for cmake 3.10 and less. > > See diff below. > <snipped> > New commit message: > > + cmake: set CMP0037 policy to NEW > + > + To fix deprecation warning, CMP0037 policy was changed to NEW for > cmake > + 3.11 and above. > + > + CMP0037 old behavior (cmake 2.8.12) allowed target names such as test. > + In cmake 3.10 and below names test, help and etc. were reserved. > + > + Starting from cmake 3.11 these names are only reserved when the > corresponding > + feature is enabled (e.g. by including the CTest or CPack modules). > + Tarantool does not use CTest so the name test can be used. > + > + Closes: #3587 I guess you missed this one: | > > Please, don't use ':' in gh tags. It just doesn't respect our commit | > > message style. | > > > > Code diff: > > -if(POLICY CMP0037) > - cmake_policy(SET CMP0037 NEW) > -endif(POLICY CMP0037) It looks better to reorder conditions: make policy test an outer one and check CMake version in scope of it. > +if(CMAKE_VERSION VERSION_LESS 3.11) Minor: Strictly saying this policy should be used for versions starting from 3.0, when the policy was introduced, to 3.11, when CMake team realized that unconditional reserving for popular target names is insane. At the same time I checked your last patch on Centos 7 and saw no warning in the output. So I guess you can just leave the corresponding comment or feel free to ignore this remark. > + if(POLICY CMP0037) > + cmake_policy(SET CMP0037 OLD) > + endif(POLICY CMP0037) > +else() > + if(POLICY CMP0037) > + cmake_policy(SET CMP0037 NEW) > + endif(POLICY CMP0037) > +endif() > Otherwise, the changes LGTM, thanks! Sergey, please proceed with the patch. <snipped> -- Best regards, IM
next prev parent reply other threads:[~2020-05-26 9:07 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-16 12:15 Olga Arkhangelskaia 2020-04-27 17:09 ` Igor Munkin 2020-05-21 15:33 ` Olga Arkhangelskaia 2020-05-25 12:28 ` Igor Munkin 2020-05-25 16:19 ` Olga Arkhangelskaia 2020-05-26 8:59 ` Igor Munkin [this message] 2020-05-26 9:12 ` Igor Munkin 2020-05-27 10:17 ` Olga Arkhangelskaia 2020-05-27 10:15 ` Olga Arkhangelskaia 2020-06-14 22:22 ` Alexander Turenko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200526085907.GJ5455@tarantool.org \ --to=imun@tarantool.org \ --cc=arkholga@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] cmake: set CMP0037 policy to NEW by default' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox