[cmake-developers] [CMake 0014972]: Ninja gen generates invalid phony dependencies for source files with in-source build

Mantis Bug Tracker mantis at public.kitware.com
Thu Jun 12 14:02:11 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14972 
====================================================================== 
Reported By:                Adam Strzelecki
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14972
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-06-12 14:02 EDT
Last Modified:              2014-06-12 14:02 EDT
====================================================================== 
Summary:                    Ninja gen generates invalid phony dependencies for
source files with in-source build
Description: 
Related commit
==========

539356f1 Ninja: Custom Command file depends don't need to exist before building

Description
=======

Commit above creates phony dependencies for all files that are dependencies to
project outputs and reside in build folder. Unfortunately when using in-source
build this behavior causes all source files to have phony dependency which is
undesired behavior.

I don't see simple workaround, as I frankly don't understand the reasoning
behind the change above.

Steps to Reproduce: 
Setup following for in-source build with Ninja generator, then inspect generated
build.ninja has phony dependency for test.cc, which is undesired.

CMakeLists.txt
=========
cmake_minimum_required(VERSION 2.6)
project(NinjaTest CXX)
add_executable(ninja_test test.cc)

test.cc
=====
int main(int argc, char const *argv[]) { return 0; }
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-06-12 14:02 Adam StrzeleckiNew Issue                                    
======================================================================



More information about the cmake-developers mailing list