From 02f7cfbcbe6156abda04e3f52e534937a45af4bc Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 13 May 2003 16:51:01 -0400 Subject: BUG: Need to remove the MAKEFLAGS when cmake starts. If cmake is run from inside make, we don't want the try-compiles to inherit the makeflags. --- Source/cmake.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f4d3372..86c6f9d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -73,6 +73,16 @@ cmake::cmake() } #endif + // If MAKEFLAGS are given in the environment, remove the environment + // variable. This will prevent try-compile from succeeding when it + // should fail (if "-i" is an option). We cannot simply test + // whether "-i" is given and remove it because some make programs + // encode the MAKEFLAGS variable in a strange way. + if(getenv("MAKEFLAGS")) + { + putenv("MAKEFLAGS="); + } + m_Local = false; m_Verbose = false; m_InTryCompile = false; -- cgit v0.12