summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-05-13 20:51:01 (GMT)
committerBrad King <brad.king@kitware.com>2003-05-13 20:51:01 (GMT)
commit02f7cfbcbe6156abda04e3f52e534937a45af4bc (patch)
tree6a29bfe014e650f329f0c0322704d699c99ed99b /Source/cmake.cxx
parent20b198835cd9d58fd1e98dc2c6858659a3c9b288 (diff)
downloadCMake-02f7cfbcbe6156abda04e3f52e534937a45af4bc.zip
CMake-02f7cfbcbe6156abda04e3f52e534937a45af4bc.tar.gz
CMake-02f7cfbcbe6156abda04e3f52e534937a45af4bc.tar.bz2
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.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx10
1 files changed, 10 insertions, 0 deletions
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;