View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012641CMakeCMakepublic2011-12-26 13:062016-06-10 14:31
Reporterkesten 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
Platformintel core i5 x86-64OSlinuxOS Versionubuntu 11.10
Product VersionCMake 2.8.6 
Target VersionFixed in Version 
Summary0012641: cmake --build is ignored when combined with CMake's configure+generate step, please warn if --build ignored
DescriptionPlease issue a warning if "--build" is not honored.


with PROJECT_SOURCE_DIR = home/kesten/VersionControlProjects/Bazaar/Engines/Bullet/bullet-trunk/trunk

PROJECT_SOURCE_DIR$ cmake -G "Unix Makefiles" --build ../../cmake-build-svn-trunk

-- Build files have been written to: /home/kesten/VersionControlProjects/Bazaar/Engines/Bullet/bullet-trunk/trunk

If I supply a "." to take the place of path-to-source-dir then it works

PROJECT_SOURCE_DIR$ cmake -G "Unix Makefiles" --build ../../cmake-build-svn-trunk .

Expected Behaviour:
cmake can run with no paths given. cmake --build <dir> should put build files in <dir>. At the least, a warning should be issued that --build was ignored because cmake expected: cmake --build <dir> path-to-source (use "." for dir that cmake is issued from)
Steps To Reproducerun cmake --build <dir> without specifying path-to-source or build-dir after <dir>

TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0028075)
David Cole (manager)
2011-12-27 19:12

That's not the way "cmake --build" is intended to be used. Try this instead:

PROJECT_SOURCE_DIR = home/kesten/VersionControlProjects/Bazaar/Engines/Bullet/bullet-trunk/trunk

PROJECT_BUILD_DIR = ${PROJECT_SOURCE_DIR}/../../cmake-build-svn-trunk

PROJECT_SOURCE_DIR$ mkdir ../../cmake-build-svn-trunk
PROJECT_SOURCE_DIR$ cd ../../cmake-build-svn-trunk

PROJECT_BUILD_DIR$ cmake -G "Unix Makefiles" ../bullet-trunk/trunk
PROJECT_BUILD_DIR$ cmake --build .

CMake cannot be run with no paths given. You have to run "cmake source_dir" with the build_dir as the current directory for the initial configure. On subsequent configures, you can run "cmake ." in the build tree to re-run cmake's configure+generate steps, and then "cmake --build ." in the build tree to build.


"At the least, a warning should be issued that --build was ignored..." -- this is a good idea. I'll leave the bug open and change the title to request a warning when "--build" is not honored. I'd have to look at the source to be 100% certain, but I think it is only honored if it is the very first argument to cmake.
(0030342)
David Cole (manager)
2012-08-11 21:09

Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0040252)
Ashley Whetter (reporter)
2016-01-17 17:12

I've submitted an idea for patch for this: http://public.kitware.com/pipermail/cmake-developers/2016-January/027496.html [^]
(0041948)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-12-26 13:06 kesten New Issue
2011-12-27 19:12 David Cole Note Added: 0028075
2011-12-27 19:15 David Cole Summary cmake --build <dir> confuses cmake. <dir> is treated as source to path or source to build dir => cmake --build is ignored when combined with CMake's configure+generate step, please warn if --build ignored
2011-12-27 19:15 David Cole Description Updated
2012-08-11 21:09 David Cole Status new => backlog
2012-08-11 21:09 David Cole Note Added: 0030342
2016-01-17 17:12 Ashley Whetter Note Added: 0040252
2016-06-10 14:28 Kitware Robot Note Added: 0041948
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team