View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013617CMakeCMakepublic2012-10-30 12:112016-06-10 14:31
ReporterBartÅ‚omiej Palmowski 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionmoved 
Platformx86-64OSlinuxOS Versionall
Product VersionCMake 2.8.9 
Target VersionFixed in Version 
Summary0013617: use $(MAKE) -C instead of cd <path> && /usr/bin/gmake
DescriptionHi,

in case of add_custom_target or add_custom_command if one uses ${CMAKE_MAKE_PROGRAM} like this:

[...]
COMMAND ${CMAKE_MAKE_PROGRAM}
[...]

Unix make generator will translate it as:
cd <path> && /usr/bin/gmake

which kills jobserver, I know that cmake code is agnostic of what is generated, but it would be nice if actually $(MAKE) -C <path> was generated.
Steps To Reproduce[palmowsk@suzuki bug]$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.6)

project(feature_request)

add_custom_target(run_make
    COMMAND ${CMAKE_MAKE_PROGRAM} -f ${PROJECT_SOURCE_DIR}/test.mk
)
[palmowsk@suzuki bug]$ cat test.mk
.PHONY: all

all: a b c

.DEFAULT:
        echo $@
        sleep 5
[palmowsk@suzuki bug]$ mkdir build
[palmowsk@suzuki bug]$ cd build/
[palmowsk@suzuki build]$ cmake ..
-- The C compiler identification is GNU 4.4.6
-- The CXX compiler identification is GNU 4.4.6
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/palmowsk/bug/build
[palmowsk@suzuki build]$ make run_make
Scanning dependencies of target run_make
a
b
c
Built target run_make
[palmowsk@suzuki build]$ make run_make -j3 # jobserver isn't going to work
gmake[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
a
b
c
Built target run_make
[palmowsk@suzuki build]$
Additional Informationcmake version 2.8.8
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042138)
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
2012-10-30 12:11 Bartłomiej Palmowski New Issue
2016-06-10 14:28 Kitware Robot Note Added: 0042138
2016-06-10 14:28 Kitware Robot Status new => 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