Merge branch 'release'
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index 0e61da4..1a46688 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -44,6 +44,10 @@
"cc-3968 CC: WARNING File.*" # "implicit" truncation by static_cast
"ld: warning: directory not found for option .-(F|L)"
"warning.*This version of Mac OS X is unsupported"
+
+ # Ignore clang's summary warning, assuming prior text has matched some
+ # other warning expression:
+ "[0-9,]+ warnings? generated."
)
IF(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")
diff --git a/Modules/CMakeVS11FindMake.cmake b/Modules/CMakeVS11FindMake.cmake
new file mode 100644
index 0000000..302efaa
--- /dev/null
+++ b/Modules/CMakeVS11FindMake.cmake
@@ -0,0 +1,54 @@
+
+#=============================================================================
+# Copyright 2007-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Look for devenv as a build program. We need to use this to support
+# Intel Fortran integration into VS. MSBuild can not be used for that case
+# since Intel Fortran uses the older devenv file format.
+FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+ NAMES devenv
+ HINTS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;EnvironmentDirectory]
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup;Dbghelp_path]
+ "$ENV{ProgramFiles}/Microsoft Visual Studio 11.0/Common7/IDE"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio11.0/Common7/IDE"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio 11/Common7/IDE"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio11/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11.0/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11.0/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11/Common7/IDE"
+ "/Program Files/Microsoft Visual Studio 11.0/Common7/IDE/"
+ "/Program Files/Microsoft Visual Studio 11/Common7/IDE/"
+ )
+
+# if devenv is not found, then use MSBuild.
+# it is expected that if devenv is not found, then we are
+# dealing with Visual Studio Express. VCExpress has random
+# failures when being run as a command line build tool which
+# causes the compiler checks and try-compile stuff to fail. MSbuild
+# is a better choice for this. However, VCExpress does not support
+# cross compiling needed for Win CE.
+IF(NOT CMAKE_CROSSCOMPILING)
+ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+ NAMES MSBuild
+ HINTS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir]
+ "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
+ "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
+ "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/")
+ENDIF()
+
+MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+SET(MSVC11 1)
+SET(MSVC_VERSION 1700)
diff --git a/Modules/FindBullet.cmake b/Modules/FindBullet.cmake
index cebb828..aea9158 100644
--- a/Modules/FindBullet.cmake
+++ b/Modules/FindBullet.cmake
@@ -59,13 +59,13 @@
# Find the libraries
_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics)
-_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_d)
+_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d)
_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision)
-_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_d)
-_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY LinearMath BulletMath)
-_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG LinearMath_d BulletMath_d)
+_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d)
+_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath)
+_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_d)
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody)
-_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d)
+_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d)
# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake
index d101e61..7f4318f 100644
--- a/Modules/UsePkgConfig.cmake
+++ b/Modules/UsePkgConfig.cmake
@@ -1,13 +1,14 @@
-# - obsolete pkg-config module for CMake
+# - Obsolete pkg-config module for CMake, use FindPkgConfig instead.
#
-# Defines the following macros:
+# This module defines the following macro:
#
# PKGCONFIG(package includedir libdir linkflags cflags)
#
# Calling PKGCONFIG will fill the desired information into the 4 given arguments,
# e.g. PKGCONFIG(libart-2.0 LIBART_INCLUDE_DIR LIBART_LINK_DIR LIBART_LINK_FLAGS LIBART_CFLAGS)
# if pkg-config was NOT found or the specified software package doesn't exist, the
-# variable will be empty when the function returns, otherwise they will contain the respective information
+# variable will be empty when the function returns, otherwise they will contain
+# the respective information
#
#=============================================================================
@@ -27,7 +28,7 @@
MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
MESSAGE(STATUS
- "WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig")
+ "WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig")
# reset the variables at the beginning
SET(${_include_DIR})
SET(${_link_DIR})
@@ -42,20 +43,20 @@
# and if the package of interest also exists for pkg-config, then get the information
IF(NOT _return_VALUE)
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
+ EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
OUTPUT_VARIABLE ${_include_DIR} )
STRING(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
-
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
+
+ EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
OUTPUT_VARIABLE ${_link_DIR} )
STRING(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
+ EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
OUTPUT_VARIABLE ${_link_FLAGS} )
STRING(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
+ EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
OUTPUT_VARIABLE ${_cflags} )
STRING(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
@@ -64,10 +65,10 @@
MESSAGE(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)")
ENDIF(NOT _return_VALUE)
-
+
# if pkg-config has NOT been found, INFORM the user
ELSE(PKGCONFIG_EXECUTABLE)
-
+
MESSAGE(STATUS "WARNING: PKGCONFIG() indicates that the tool pkg-config has not been found on your system. You should install it.")
ENDIF(PKGCONFIG_EXECUTABLE)
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 96b3ea0..ba41d98 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -324,6 +324,10 @@
cmGlobalVisualStudio10Win64Generator.cxx
cmGlobalVisualStudio10IA64Generator.h
cmGlobalVisualStudio10IA64Generator.cxx
+ cmGlobalVisualStudio11Generator.h
+ cmGlobalVisualStudio11Generator.cxx
+ cmGlobalVisualStudio11Win64Generator.h
+ cmGlobalVisualStudio11Win64Generator.cxx
cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h
cmGlobalWatcomWMakeGenerator.cxx
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 96a214e..dca2fb3 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -22,12 +22,12 @@
// which signature were we called with ?
this->SrcFileSignature = false;
unsigned int i;
-
+
const char* sourceDirectory = argv[2].c_str();
const char* projectName = 0;
const char* targetName = 0;
int extraArgs = 0;
-
+
// look for CMAKE_FLAGS and store them
std::vector<std::string> cmakeFlags;
for (i = 3; i < argv.size(); ++i)
@@ -37,8 +37,8 @@
// CMAKE_FLAGS is the first argument because we need an argv[0] that
// is not used, so it matches regular command line parsing which has
// the program name as arg 0
- for (; i < argv.size() && argv[i] != "COMPILE_DEFINITIONS" &&
- argv[i] != "OUTPUT_VARIABLE";
+ for (; i < argv.size() && argv[i] != "COMPILE_DEFINITIONS" &&
+ argv[i] != "OUTPUT_VARIABLE";
++i)
{
extraArgs++;
@@ -73,8 +73,8 @@
if (argv[i] == "COMPILE_DEFINITIONS")
{
extraArgs++;
- for (i = i + 1; i < argv.size() && argv[i] != "CMAKE_FLAGS" &&
- argv[i] != "OUTPUT_VARIABLE";
+ for (i = i + 1; i < argv.size() && argv[i] != "CMAKE_FLAGS" &&
+ argv[i] != "OUTPUT_VARIABLE";
++i)
{
extraArgs++;
@@ -101,7 +101,7 @@
break;
}
}
-
+
// do we have a srcfile signature
if (argv.size() - extraArgs == 3)
{
@@ -133,7 +133,7 @@
}
// make sure the binary directory exists
cmSystemTools::MakeDirectory(this->BinaryDirectory.c_str());
-
+
// do not allow recursive try Compiles
if (this->BinaryDirectory == this->Makefile->GetHomeOutputDirectory())
{
@@ -143,7 +143,7 @@
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
return -1;
}
-
+
std::string outFileName = this->BinaryDirectory + "/CMakeLists.txt";
// which signature are we using? If we are using var srcfile bindir
if (this->SrcFileSignature)
@@ -151,7 +151,7 @@
// remove any CMakeCache.txt files so we will have a clean test
std::string ccFile = this->BinaryDirectory + "/CMakeCache.txt";
cmSystemTools::RemoveFile(ccFile.c_str());
-
+
// we need to create a directory and CMakeList file etc...
// first create the directories
sourceDirectory = this->BinaryDirectory.c_str();
@@ -226,7 +226,7 @@
langFlags += "_FLAGS";
fprintf(fout, "SET(CMAKE_VERBOSE_MAKEFILE 1)\n");
fprintf(fout, "SET(CMAKE_%s_FLAGS \"", lang);
- const char* flags = this->Makefile->GetDefinition(langFlags.c_str());
+ const char* flags = this->Makefile->GetDefinition(langFlags.c_str());
if(flags)
{
fprintf(fout, " %s ", flags);
@@ -247,10 +247,10 @@
}
/* for the TRY_COMPILEs we want to be able to specify the architecture.
- So the user can set CMAKE_OSX_ARCHITECTURE to i386;ppc and then set
+ So the user can set CMAKE_OSX_ARCHITECTURE to i386;ppc and then set
CMAKE_TRY_COMPILE_OSX_ARCHITECTURE first to i386 and then to ppc to
- have the tests run for each specific architecture. Since
- cmLocalGenerator doesn't allow building for "the other"
+ have the tests run for each specific architecture. Since
+ cmLocalGenerator doesn't allow building for "the other"
architecture only via CMAKE_OSX_ARCHITECTURES.
*/
if(this->Makefile->GetDefinition("CMAKE_TRY_COMPILE_OSX_ARCHITECTURES")!=0)
@@ -286,45 +286,45 @@
this->BinaryDirectory.c_str());
/* Create the actual executable. */
fprintf(fout, "ADD_EXECUTABLE(cmTryCompileExec \"%s\")\n",source.c_str());
- fprintf(fout,
+ fprintf(fout,
"TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})\n");
fclose(fout);
projectName = "CMAKE_TRY_COMPILE";
targetName = "cmTryCompileExec";
- // if the source is not in CMakeTmp
+ // if the source is not in CMakeTmp
if(source.find("CMakeTmp") == source.npos)
{
this->Makefile->AddCMakeDependFile(source.c_str());
}
-
+
}
// else the srcdir bindir project target signature
else
{
projectName = argv[3].c_str();
-
+
if (argv.size() - extraArgs == 5)
{
targetName = argv[4].c_str();
}
}
-
+
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
cmSystemTools::ResetErrorOccuredFlag();
std::string output;
// actually do the try compile now that everything is setup
- int res = this->Makefile->TryCompile(sourceDirectory,
+ int res = this->Makefile->TryCompile(sourceDirectory,
this->BinaryDirectory.c_str(),
- projectName,
- targetName,
+ projectName,
+ targetName,
this->SrcFileSignature,
- &cmakeFlags,
+ &cmakeFlags,
&output);
if ( erroroc )
{
cmSystemTools::SetErrorOccured();
}
-
+
// set the result var to the return value to indicate success or failure
this->Makefile->AddCacheDefinition(argv[0].c_str(),
(res == 0 ? "TRUE" : "FALSE"),
@@ -335,7 +335,7 @@
{
this->Makefile->AddDefinition(outputVariable.c_str(), output.c_str());
}
-
+
if (this->SrcFileSignature)
{
this->FindOutputFile(targetName);
@@ -369,7 +369,7 @@
{
return;
}
-
+
std::string bdir = binDir;
if(bdir.find("CMakeTmp") == std::string::npos)
{
@@ -378,7 +378,7 @@
"CMakeTmp:", binDir);
return;
}
-
+
cmsys::Directory dir;
dir.Load(binDir);
size_t fileNum;
@@ -388,8 +388,8 @@
if (strcmp(dir.GetFile(static_cast<unsigned long>(fileNum)),".") &&
strcmp(dir.GetFile(static_cast<unsigned long>(fileNum)),".."))
{
-
- if(deletedFiles.find( dir.GetFile(static_cast<unsigned long>(fileNum)))
+
+ if(deletedFiles.find( dir.GetFile(static_cast<unsigned long>(fileNum)))
== deletedFiles.end())
{
deletedFiles.insert(dir.GetFile(static_cast<unsigned long>(fileNum)));
diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h
index e29dde8..5c67f13 100644
--- a/Source/cmCoreTryCompile.h
+++ b/Source/cmCoreTryCompile.h
@@ -28,27 +28,27 @@
/**
* This is the core code for try compile. It is here so that other
* commands, such as TryRun can access the same logic without
- * duplication.
+ * duplication.
*/
int TryCompileCode(std::vector<std::string> const& argv);
- /**
- * This deletes all the files created by TryCompileCode.
+ /**
+ * This deletes all the files created by TryCompileCode.
* This way we do not have to rely on the timing and
* dependencies of makefiles.
*/
void CleanupFiles(const char* binDir);
- /**
- * This tries to find the (executable) file created by
+ /**
+ * This tries to find the (executable) file created by
TryCompileCode. The result is stored in OutputFile. If nothing is found,
the error message is stored in FindErrorMessage.
*/
void FindOutputFile(const char* targetName);
-
+
cmTypeMacro(cmCoreTryCompile, cmCommand);
-
+
std::string BinaryDirectory;
std::string OutputFile;
std::string FindErrorMessage;
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 8573670..18b483d 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -79,7 +79,6 @@
virtual const char* GetIDEVersion() { return "10.0"; }
std::string PlatformToolset;
-private:
bool ExpressEdition;
};
#endif
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
new file mode 100644
index 0000000..a70427a
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -0,0 +1,45 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmGlobalVisualStudio11Generator.h"
+#include "cmMakefile.h"
+
+//----------------------------------------------------------------------------
+cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator()
+{
+ this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
+ this->ExpressEdition = false; // TODO: VS 11 Express support
+ this->PlatformToolset = "v110";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator::AddPlatformDefinitions(cmMakefile* mf)
+{
+ mf->AddDefinition("MSVC11", "1");
+ mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+ mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout)
+{
+ fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
+ fout << "# Visual Studio 2011\n";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator
+::GetDocumentation(cmDocumentationEntry& entry) const
+{
+ entry.Name = this->GetName();
+ entry.Brief = "Generates Visual Studio 11 project files.";
+ entry.Full = "";
+}
diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h
new file mode 100644
index 0000000..14019a7
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Generator.h
@@ -0,0 +1,43 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmGlobalVisualStudio11Generator_h
+#define cmGlobalVisualStudio11Generator_h
+
+#include "cmGlobalVisualStudio10Generator.h"
+
+
+/** \class cmGlobalVisualStudio11Generator */
+class cmGlobalVisualStudio11Generator:
+ public cmGlobalVisualStudio10Generator
+{
+public:
+ cmGlobalVisualStudio11Generator();
+ static cmGlobalGenerator* New() {
+ return new cmGlobalVisualStudio11Generator; }
+
+ ///! Get the name for the generator.
+ virtual const char* GetName() const {
+ return cmGlobalVisualStudio11Generator::GetActualName();}
+ static const char* GetActualName() {return "Visual Studio 11";}
+ virtual void AddPlatformDefinitions(cmMakefile* mf);
+
+ virtual void WriteSLNHeader(std::ostream& fout);
+
+ /** Get the documentation entry for this generator. */
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+ /** TODO: VS 11 user macro support. */
+ virtual std::string GetUserMacrosDirectory() { return ""; }
+protected:
+ virtual const char* GetIDEVersion() { return "11.0"; }
+};
+#endif
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.cxx b/Source/cmGlobalVisualStudio11Win64Generator.cxx
new file mode 100644
index 0000000..10c9027
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Win64Generator.cxx
@@ -0,0 +1,33 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmGlobalVisualStudio11Win64Generator.h"
+#include "cmMakefile.h"
+#include "cmake.h"
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Win64Generator
+::GetDocumentation(cmDocumentationEntry& entry) const
+{
+ entry.Name = this->GetName();
+ entry.Brief = "Generates Visual Studio 11 Win64 project files.";
+ entry.Full = "";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Win64Generator
+::AddPlatformDefinitions(cmMakefile* mf)
+{
+ this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf);
+ mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
+ mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
+ mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
+}
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.h b/Source/cmGlobalVisualStudio11Win64Generator.h
new file mode 100644
index 0000000..53f1953
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Win64Generator.h
@@ -0,0 +1,37 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmGlobalVisualStudio11Win64Generator_h
+#define cmGlobalVisualStudio11Win64Generator_h
+
+#include "cmGlobalVisualStudio11Generator.h"
+
+class cmGlobalVisualStudio11Win64Generator :
+ public cmGlobalVisualStudio11Generator
+{
+public:
+ cmGlobalVisualStudio11Win64Generator() {}
+ static cmGlobalGenerator* New() {
+ return new cmGlobalVisualStudio11Win64Generator; }
+
+ ///! Get the name for the generator.
+ virtual const char* GetName() const {
+ return cmGlobalVisualStudio11Win64Generator::GetActualName();}
+ static const char* GetActualName() {return "Visual Studio 11 Win64";}
+
+ virtual const char* GetPlatformName() const {return "x64";}
+
+ /** Get the documentation entry for this generator. */
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+ virtual void AddPlatformDefinitions(cmMakefile* mf);
+};
+#endif
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 5417584..d9b2772 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1836,14 +1836,14 @@
vskey += "\\Packages\\" CM_INTEL_PLUGIN_GUID ";ProductVersion";
cmSystemTools::ReadRegistryValue(vskey.c_str(), intelVersion,
cmSystemTools::KeyWOW64_32);
- if (intelVersion == "12.0")
+ if (intelVersion.find("12") == 0 || (intelVersion.find("11") == 0))
{
- // Version 12 actually uses 11.0 in project files!
+ // Version 11.x and 12.x actually use 11.0 in project files!
intelVersion = "11.0" ;
}
- else if(intelVersion == "10.1")
+ else if(intelVersion.find("10") == 0)
{
- // Version 10.1 actually uses 9.10 in project files!
+ // Version 10.x actually uses 9.10 in project files!
intelVersion = "9.10";
}
diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h
index feead00..320378d 100644
--- a/Source/cmSetTargetPropertiesCommand.h
+++ b/Source/cmSetTargetPropertiesCommand.h
@@ -92,7 +92,7 @@
"If not set here then it is set to target_EXPORTS by default "
"(with some substitutions if the target is not a valid C "
"identifier). This is useful for headers to know whether they are "
- "being included from inside their library our outside to properly "
+ "being included from inside their library or outside to properly "
"setup dllexport/dllimport decorations. "
"The COMPILE_FLAGS property sets additional compiler flags used "
"to build sources within the target. It may also be used to pass "
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index 4d39d54..12ce015 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -20,6 +20,14 @@
return false;
}
+ if(this->Makefile->GetCMakeInstance()->GetWorkingMode() ==
+ cmake::FIND_PACKAGE_MODE)
+ {
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ "The TRY_COMPILE() command is not supported in --find-package mode.");
+ return false;
+ }
+
this->TryCompileCode(argv);
// if They specified clean then we clean up what we can
@@ -32,4 +40,3 @@
}
return true;
}
-
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index c9c4ed5..4fc0b13 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -22,6 +22,14 @@
return false;
}
+ if(this->Makefile->GetCMakeInstance()->GetWorkingMode() ==
+ cmake::FIND_PACKAGE_MODE)
+ {
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ "The TRY_RUN() command is not supported in --find-package mode.");
+ return false;
+ }
+
// build an arg list for TryCompile and extract the runArgs,
std::vector<std::string> tryCompile;
@@ -49,8 +57,8 @@
{
tryCompile.push_back(argv[i]);
}
- }
- else
+ }
+ else
{
if (argv[i] == "OUTPUT_VARIABLE")
{
@@ -94,8 +102,8 @@
// although they could be used together, don't allow it, because
// using OUTPUT_VARIABLE makes crosscompiling harder
- if (this->OutputVariable.size()
- && ((this->RunOutputVariable.size())
+ if (this->OutputVariable.size()
+ && ((this->RunOutputVariable.size())
|| (this->CompileOutputVariable.size())))
{
cmSystemTools::Error(
@@ -141,8 +149,8 @@
std::string runOutputContents;
if (this->Makefile->IsOn("CMAKE_CROSSCOMPILING"))
{
- this->DoNotRunExecutable(runArgs,
- argv[3],
+ this->DoNotRunExecutable(runArgs,
+ argv[3],
captureRunOutput ? &runOutputContents : 0);
}
else
@@ -153,7 +161,7 @@
// now put the output into the variables
if(this->RunOutputVariable.size())
{
- this->Makefile->AddDefinition(this->RunOutputVariable.c_str(),
+ this->Makefile->AddDefinition(this->RunOutputVariable.c_str(),
runOutputContents.c_str());
}
@@ -167,7 +175,7 @@
{
runOutputContents = std::string(compileOutput) + runOutputContents;
}
- this->Makefile->AddDefinition(this->OutputVariable.c_str(),
+ this->Makefile->AddDefinition(this->OutputVariable.c_str(),
runOutputContents.c_str());
}
}
@@ -212,9 +220,9 @@
/* This is only used when cross compiling. Instead of running the
executable, two cache variables are created which will hold the results
- the executable would have produced.
+ the executable would have produced.
*/
-void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
+void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
const std::string& srcFile,
std::string* out
)
@@ -249,7 +257,7 @@
comment += "Run result of TRY_RUN(), indicates whether the executable "
"would have been able to run on its target platform.\n";
comment += detailsString;
- this->Makefile->AddCacheDefinition(this->RunResultVariable.c_str(),
+ this->Makefile->AddCacheDefinition(this->RunResultVariable.c_str(),
"PLEASE_FILL_OUT-FAILED_TO_RUN",
comment.c_str(),
cmCacheManager::STRING);
@@ -276,7 +284,7 @@
"would have printed on stdout and stderr on its target platform.\n";
comment += detailsString;
- this->Makefile->AddCacheDefinition(internalRunOutputName.c_str(),
+ this->Makefile->AddCacheDefinition(internalRunOutputName.c_str(),
"PLEASE_FILL_OUT-NOTFOUND",
comment.c_str(),
cmCacheManager::STRING);
@@ -294,7 +302,7 @@
if (error)
{
static bool firstTryRun = true;
- std::ofstream file(resultFileName.c_str(),
+ std::ofstream file(resultFileName.c_str(),
firstTryRun ? std::ios::out : std::ios::app);
if ( file )
{
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 41c67e2..05699da 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -68,6 +68,8 @@
# include "cmGlobalVisualStudio10Generator.h"
# include "cmGlobalVisualStudio10IA64Generator.h"
# include "cmGlobalVisualStudio10Win64Generator.h"
+# include "cmGlobalVisualStudio11Generator.h"
+# include "cmGlobalVisualStudio11Win64Generator.h"
# include "cmGlobalVisualStudio8Win64Generator.h"
# include "cmGlobalBorlandMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h"
@@ -2580,6 +2582,10 @@
&cmGlobalVisualStudio10IA64Generator::New;
this->Generators[cmGlobalVisualStudio10Win64Generator::GetActualName()] =
&cmGlobalVisualStudio10Win64Generator::New;
+ this->Generators[cmGlobalVisualStudio11Generator::GetActualName()] =
+ &cmGlobalVisualStudio11Generator::New;
+ this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] =
+ &cmGlobalVisualStudio11Win64Generator::New;
this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] =
&cmGlobalVisualStudio71Generator::New;
this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index d421f4c..7fff66a 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2011)
# KWSys version date month component. Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 09)
+SET(KWSYS_DATE_STAMP_MONTH 10)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 22)
+SET(KWSYS_DATE_STAMP_DAY 04)
diff --git a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
index 8095a1c..8b279a5 100644
--- a/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
+++ b/Tests/CheckCompilerRelatedVariables/CMakeLists.txt
@@ -34,6 +34,9 @@
if(DEFINED MSVC10)
math(EXPR msvc_total "${msvc_total} + 1")
endif()
+if(DEFINED MSVC11)
+ math(EXPR msvc_total "${msvc_total} + 1")
+endif()
echo_var(MSVC)
echo_var(MSVC60)
@@ -42,6 +45,7 @@
echo_var(MSVC80)
echo_var(MSVC90)
echo_var(MSVC10)
+echo_var(MSVC11)
if(MSVC)
#
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index b4ec17c..1ed7b83 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -37,6 +37,9 @@
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
set(PP_VS100 1)
endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 10")
+if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11")
+ set(PP_VS110 1)
+endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 11")
# Some tests below check the PP_* variables set above. They are meant
# to test the case that the build tool is at fault. Other tests below
@@ -52,7 +55,7 @@
# must not have it escaped inside the configured header.
set(STRING_EXTRA "")
-if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100)
+if(NOT BORLAND AND NOT PP_VS70 AND NOT PP_VS100 AND NOT PP_VS110)
# Borland, VS70 IDE: ;
# The Borland compiler will simply not accept a non-escaped semicolon
# on the command line. If it is escaped \; then the escape character
diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt
index 1e68968..a2fd619 100644
--- a/Tests/VSExternalInclude/CMakeLists.txt
+++ b/Tests/VSExternalInclude/CMakeLists.txt
@@ -6,7 +6,7 @@
ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
SET(PROJECT_EXT vcproj)
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
-IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 10")
+IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01]")
SET(PROJECT_EXT vcxproj)
ENDIF()
@@ -46,7 +46,7 @@
# and the sln file can no longer be the only source
# of that depend. So, for VS 10 make the executable
# depend on lib1 and lib2
-IF(MSVC10)
+IF(MSVC10 OR MSVC11)
ADD_DEPENDENCIES(VSExternalInclude lib1)
ENDIF()