summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-10-16 18:28:37 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-10-16 18:28:37 (GMT)
commit236d1ebf56a5349a50b9251c68ceadffc01ea708 (patch)
tree84b1c54aa16caf78f674819aea934c4b0d3a5cda /Source
parent1de1f4bb834b37ee96b56fc72949b87139d4b318 (diff)
downloadCMake-236d1ebf56a5349a50b9251c68ceadffc01ea708.zip
CMake-236d1ebf56a5349a50b9251c68ceadffc01ea708.tar.gz
CMake-236d1ebf56a5349a50b9251c68ceadffc01ea708.tar.bz2
ENH: added CMAKE_STRICT option for var and property checking
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt3
-rw-r--r--Source/cmConfigure.cmake.h.in1
-rw-r--r--Source/cmPropertyMap.cxx3
3 files changed, 4 insertions, 3 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 55e4115..6a7c2dc 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -1,4 +1,7 @@
# configure the .h file
+OPTION(CMAKE_STRICT
+ "Perform strict testing to see if ANY properties or variables are used before being defined" OFF)
+
CONFIGURE_FILE(
"${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in"
"${CMake_BINARY_DIR}/Source/cmConfigure.h"
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 8aeb588..0824cdd 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -20,6 +20,7 @@
#cmakedefine CMAKE_NO_ANSI_FOR_SCOPE
#cmakedefine HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE
#cmakedefine HAVE_UNSETENV
+#cmakedefine CMAKE_STRICT
#define CMAKE_ROOT_DIR "${CMake_SOURCE_DIR}"
#define CMAKE_BUILD_DIR "${CMake_BINARY_DIR}"
#define CMAKE_PREFIX "${CMAKE_INSTALL_PREFIX}"
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index c69ca7b..6820694 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -18,9 +18,6 @@
#include "cmSystemTools.h"
#include "cmake.h"
-// define STRICT to get checking of all set and get property calls
-//#define CMAKE_STRICT
-
cmProperty *cmPropertyMap::GetOrCreateProperty(const char *name)
{
cmPropertyMap::iterator it = this->find(name);