[CMake] Prevent make (linux) from fowling dependencies out of cwd

Mark Miller miller86 at llnl.gov
Thu Feb 24 22:58:56 EST 2011


I am on a large project that uses CMake. I do my development primarily
on Linux. Prior to introduction of CMake, the makefiles we produced
would be such that I could cd into some directory and type something
like 'make -j 4' and it would make everything in that directory AND ONLY
that directory, in parallel.

However, now with the Makefiles that CMake is producing, that is no
longer possible. Or, at least I don't know how to invoke either CMake
(to generate the Makefiles) or perhaps make with appropriate variable(s)
set to affect desired behavior.

Does anyone know of a way to do this? Is there a way to invoke CMake
such that the resulting Makefiles do not 'follow dependencies' out of
cwd? Or, are there maybe some Make variables CMake defines that I can
then pass to Make to prevent it from following dependencies out of cwd?

I suppose I'd even accept a solution that required (minor) adjustments
to top-level CMakeLists.txt file to affect this behavior.

Thanks in advance for any help.

Mark



-- 
Mark C. Miller, Lawrence Livermore National Laboratory
================!!LLNL BUSINESS ONLY!!================
miller86 at llnl.gov      urgent: miller86 at pager.llnl.gov
T:8-6 (925)-423-5901    M/W/Th:7-12,2-7 (530)-753-8511



More information about the CMake mailing list