The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=13617 ====================================================================== Reported By: Bartłomiej Palmowski Assigned To: ====================================================================== Project: CMake Issue ID: 13617 Category: CMake Reproducibility: N/A Severity: feature Priority: normal Status: new ====================================================================== Date Submitted: 2012-10-30 12:11 EDT Last Modified: 2012-10-30 12:11 EDT ====================================================================== Summary: use $(MAKE) -C instead of cd <path> && /usr/bin/gmake Description: Hi,
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 Information: cmake version 2.8.8 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2012-10-30 12:11 Bartłomiej PalmowskiNew Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers