View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013159CMakeModulespublic2012-04-22 15:142012-05-22 11:24
ReporterMatthew McCormick 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0013159: Ninja generator + non-CMake Makefile ExternalProject fails.
DescriptionA Ninja generator is used with a non-CMake External project, then the build command is not passed in a way that is recognized by Ninja. It tries to use '$(MAKE)', but ninja does not like the '$', and $(MAKE) is likely not available? The explicit 'make' was replaced in the attached patch.
Steps To ReproduceConfigure ITK with Ninja. Turn on ITK_WRAP_PYTHON. The failure occurs with the ExternalProject build of SWIG.
Additional Informationpatch attached
TagsNo tags attached.
Attached Filespatch file icon 0001-ExternalProject-Fix-build-command-for-Ninja-make.patch [^] (1,226 bytes) 2012-04-22 15:14 [Show Content]
patch file icon 0001-ExternalProject-Fix-build-command-for-Ninja-make.2.patch [^] (1,227 bytes) 2012-05-21 14:51 [Show Content]

 Relationships

  Notes
(0029308)
Bill Hoffman (manager)
2012-04-23 09:55
edited on: 2012-04-23 10:00

OK, I get it now...

    else() # if(cfg_cmd_id STREQUAL "configure")
      # Non-CMake project. Guess "make" and "make install" and "make test".
      # But use "$(MAKE)" to get recursive parallel make.
      set(cmd "$(MAKE)")

The code should make sure that a makefile generator is being used before using $(MAKE)

More like this:

+ if("${CMAKE_GENERATOR}" MATCHES "Makefiles")
+ # To try to get the parallel arguments.
+ set(cmd "$(MAKE)")
+ else()
+ # use regular make command if generator is not make based
+ set(cmd "make")
+ endif()
if(

(0029314)
Matthew McCormick (reporter)
2012-04-23 10:56

Yes, that looks good.
(0029532)
Matthew McCormick (reporter)
2012-05-21 14:52

Uploaded a patch with Bill's suggestion. It is a slight improvement because it will help any future non-Ninja cases where "$(MAKE)" is not available.
(0029534)
David Cole (manager)
2012-05-21 15:08

Brad, do you think Matt's latest patch is the right fix for this issue...?
(0029539)
Brad King (manager)
2012-05-21 19:00

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9097c74 [^]
(0029544)
Matthew McCormick (reporter)
2012-05-22 11:24

Excellent. Thanks.

 Issue History
Date Modified Username Field Change
2012-04-22 15:14 Matthew McCormick New Issue
2012-04-22 15:14 Matthew McCormick File Added: 0001-ExternalProject-Fix-build-command-for-Ninja-make.patch
2012-04-23 08:26 David Cole Assigned To => David Cole
2012-04-23 08:26 David Cole Status new => assigned
2012-04-23 09:55 Bill Hoffman Note Added: 0029308
2012-04-23 10:00 Bill Hoffman Note Edited: 0029308
2012-04-23 10:56 Matthew McCormick Note Added: 0029314
2012-05-21 14:51 Matthew McCormick File Added: 0001-ExternalProject-Fix-build-command-for-Ninja-make.2.patch
2012-05-21 14:52 Matthew McCormick Note Added: 0029532
2012-05-21 15:07 David Cole Target Version => CMake 2.8.9
2012-05-21 15:08 David Cole Assigned To David Cole => Brad King
2012-05-21 15:08 David Cole Note Added: 0029534
2012-05-21 19:00 Brad King Note Added: 0029539
2012-05-21 19:00 Brad King Status assigned => resolved
2012-05-21 19:00 Brad King Fixed in Version => CMake 2.8.9
2012-05-21 19:00 Brad King Resolution open => fixed
2012-05-22 11:24 Matthew McCormick Note Added: 0029544
2012-05-22 11:24 Matthew McCormick Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team