[cmake-developers] Alternate if() without implicit variable expansion

Brad King brad.king at kitware.com
Thu Sep 11 12:53:13 EDT 2014


On 09/11/2014 11:52 AM, Nils Gladitz wrote:
> cmConditionEvaluator.cxx doesn't exist without the CMP0054 changes 
> because I created it after I did most of the CMP0054 changes.
> Since most of the changes are replacements rather than plain additions 
> *removing* those changes would mean having to restore those code parts 
> which however used to be in cmIf.cxx rather than cmConditionEvaluator.cxx.

I think you missed the part about squashing your changes together
into the first commit of the topic.  I just rewrote the topic
to do that.  Now you can start working from commit 5922fc2c:

 git checkout -b tmp 5922fc2c
 git rm Help/policy/CMP0054.rst Help/release/dev/if-sanity.rst
 git checkout HEAD~1 -- Help
 git rm -rf Tests/RunCMake/CMP0054
 git checkout HEAD~1 -- Tests/RunCMake/CMakeLists.txt
 git commit --amend

Then keep editing the files and amending the commit to leave
behind only the refactoring pieces.  Amend the commit message
accordingly too.  Then do:

 commit=$(git commit-tree 5922fc2c^{tree} -p HEAD)
 git merge $commit
 git commit --amend -C 5922fc2c

to restore the rest of the commit's changes.  Then rebase
the rest of the topic to get the warning cleanups.

-Brad




More information about the cmake-developers mailing list