Hi,
I am trying to migrate a very large project from cmake 2.8.11.2 + ninja 1.3.4 
to cmake 3.7.2 + ninja 1.7.2 and found what might be a bug with the ninja 
generator.  In my project we have a number of executables that are named 
"test".  This is normally not a problem since each one as a different target 
name that is unique.  However, with the move to CMake 3.7.2 the Ninja generator 
seems to generate ambiguous target aliases for the project.  If I rename my 
outputs to something such as "testfoo", the problem goes away.  Looking at the 
build.ninja that is generated there are clearly multiple ambiguous targets.  
One that I generates the output file named "test" and one I believe meant to 
run our unit tests.  That second part I believe is what is different between 
the versions of CMake that I am using.

The other thing is I believe even if those are removed there would be a final 
ambiguity between my executable and built in "test" command because the portion 
of the code the generates the section of the build.ninja file commented as "# 
Target aliases." seems to try and avoid ambiguities between targets but fails 
to consider built in cmake targets such as "test,install,install/strip,etc..."

Again, I am not a build.ninja expert so I may be wrong in my understanding.  
Some further info, this does not occur on windows because on windows the 
targets all end with ".exe" and it does not happen with the Makefile generator 
on Linux.

Is this expected behavior?
If so, are executables named "test" no longer supported?
Am I missing something or wrong in some way?

Any help would be appreciated.

Thanks,
Kris Malfettone

________________________________

IMPORTANT: The information contained in this email and/or its attachments is 
confidential. If you are not the intended recipient, please notify the sender 
immediately by reply and immediately delete this message and all its 
attachments. Any review, use, reproduction, disclosure or dissemination of this 
message or any attachment by an unintended recipient is strictly prohibited. 
Neither this message nor any attachment is intended as or should be construed 
as an offer, solicitation or recommendation to buy or sell any security or 
other financial instrument. Neither the sender, his or her employer nor any of 
their respective affiliates makes any warranties as to the completeness or 
accuracy of any of the information contained herein or that this message or any 
of its attachments is free of viruses.
-- 

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

Reply via email to