summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst18
-rw-r--r--Help/release/dev/FindGTest-depends.rst6
-rw-r--r--Help/release/dev/ninja-depfile-system-headers.rst5
-rw-r--r--Help/release/dev/vs-remote-directory.rst7
-rw-r--r--Modules/Compiler/GNU.cmake2
-rw-r--r--Modules/Compiler/Intel-C.cmake2
-rw-r--r--Modules/Compiler/Intel-CXX.cmake2
-rw-r--r--Modules/Compiler/QCC.cmake2
-rw-r--r--Modules/FindBoost.cmake14
-rw-r--r--Modules/FindGTest.cmake4
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmCreateTestSourceList.cxx3
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx3
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmGlobalGenerator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx3
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx26
-rw-r--r--Source/cmLocalVisualStudio7Generator.h3
-rw-r--r--Source/cmMakefile.cxx20
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx3
-rw-r--r--Source/cmake.cxx3
22 files changed, 100 insertions, 34 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index d6618fe..fbde4eb 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -141,6 +141,7 @@ Properties on Targets
/prop_tgt/CXX_STANDARD_REQUIRED
/prop_tgt/DEBUG_POSTFIX
/prop_tgt/DEFINE_SYMBOL
+ /prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY
/prop_tgt/EchoString
/prop_tgt/ENABLE_EXPORTS
/prop_tgt/EXCLUDE_FROM_ALL
diff --git a/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst b/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst
new file mode 100644
index 0000000..1ff5bf0
--- /dev/null
+++ b/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst
@@ -0,0 +1,18 @@
+DEPLOYMENT_REMOTE_DIRECTORY
+---------------------------
+
+Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and
+``RemoteExecutable`` in ``DebuggerTool`` in ``.vcproj`` files generated
+by the :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005`
+generators. This is useful when you want to debug on remote WinCE device.
+For example:
+
+.. code-block:: cmake
+
+ set_property(TARGET ${TARGET} PROPERTY
+ DEPLOYMENT_REMOTE_DIRECTORY "\\FlashStorage")
+
+produces::
+
+ <DeploymentTool RemoteDirectory="\FlashStorage" ... />
+ <DebuggerTool RemoteExecutable="\FlashStorage\target_file" ... />
diff --git a/Help/release/dev/FindGTest-depends.rst b/Help/release/dev/FindGTest-depends.rst
new file mode 100644
index 0000000..33c1489
--- /dev/null
+++ b/Help/release/dev/FindGTest-depends.rst
@@ -0,0 +1,6 @@
+FindGTest-depends
+-----------------
+
+* The :module:`FindGTest` module ``gtest_add_tests`` function now causes
+ CMake to automatically re-run when test sources change so that they
+ can be re-scanned.
diff --git a/Help/release/dev/ninja-depfile-system-headers.rst b/Help/release/dev/ninja-depfile-system-headers.rst
new file mode 100644
index 0000000..7033cef
--- /dev/null
+++ b/Help/release/dev/ninja-depfile-system-headers.rst
@@ -0,0 +1,5 @@
+ninja-depfile-system-headers
+----------------------------
+
+* The :generator:`Ninja` generator now includes system header files in build
+ dependencies to ensure correct re-builds when system packages are updated.
diff --git a/Help/release/dev/vs-remote-directory.rst b/Help/release/dev/vs-remote-directory.rst
new file mode 100644
index 0000000..194236d
--- /dev/null
+++ b/Help/release/dev/vs-remote-directory.rst
@@ -0,0 +1,7 @@
+vs-remote-directory
+-------------------
+
+* The :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005`
+ generators learned to generate the remote directory for WinCE project
+ deployment and debugger settings. See the
+ :prop_tgt:`DEPLOYMENT_REMOTE_DIRECTORY` target property.
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index d1ca85e..c2d393d 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -41,7 +41,7 @@ macro(__compiler_gnu lang)
# distcc does not transform -o to -MT when invoking the preprocessor
# internally, as it ought to. Work around this bug by setting -MT here
# even though it isn't strictly necessary.
- set(CMAKE_DEPFILE_FLAGS_${lang} "-MMD -MT <OBJECT> -MF <DEPFILE>")
+ set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <OBJECT> -MF <DEPFILE>")
endif()
# Initial configuration flags.
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
index dfba4b2..77363eb 100644
--- a/Modules/Compiler/Intel-C.cmake
+++ b/Modules/Compiler/Intel-C.cmake
@@ -6,7 +6,7 @@ set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
-set(CMAKE_DEPFILE_FLAGS_C "-MMD -MT <OBJECT> -MF <DEPFILE>")
+set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>")
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 7947695..02c636c 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -6,7 +6,7 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
-set(CMAKE_DEPFILE_FLAGS_CXX "-MMD -MT <OBJECT> -MF <DEPFILE>")
+set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <OBJECT> -MF <DEPFILE>")
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/QCC.cmake b/Modules/Compiler/QCC.cmake
index 76477e4..f69c7bd 100644
--- a/Modules/Compiler/QCC.cmake
+++ b/Modules/Compiler/QCC.cmake
@@ -20,5 +20,5 @@ macro(__compiler_qcc lang)
set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V")
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,")
- set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
+ set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
endmacro()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index c3058ea..728dcdf 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -745,9 +745,10 @@ endfunction()
# defined; FALSE if dependency information is unavailable).
#
# componentvar - the component list variable name
+# extravar - the indirect dependency list variable name
#
#
-function(_Boost_MISSING_DEPENDENCIES componentvar)
+function(_Boost_MISSING_DEPENDENCIES componentvar extravar)
# _boost_unprocessed_components - list of components requiring processing
# _boost_processed_components - components already processed (or currently being processed)
# _boost_new_components - new components discovered for future processing
@@ -773,7 +774,12 @@ function(_Boost_MISSING_DEPENDENCIES componentvar)
set(_boost_unprocessed_components ${_boost_new_components})
unset(_boost_new_components)
endwhile()
+ set(_boost_extra_components ${_boost_processed_components})
+ if(_boost_extra_components AND ${componentvar})
+ list(REMOVE_ITEM _boost_extra_components ${${componentvar}})
+ endif()
set(${componentvar} ${_boost_processed_components} PARENT_SCOPE)
+ set(${extravar} ${_boost_extra_components} PARENT_SCOPE)
endfunction()
#
@@ -1306,7 +1312,7 @@ endif()
# Additional components may be required via component dependencies.
# Add any missing components to the list.
-_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS)
+_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS _Boost_EXTRA_FIND_COMPONENTS)
# If thread is required, get the thread libs as a dependency
list(FIND Boost_FIND_COMPONENTS thread _Boost_THREAD_DEPENDENCY_LIBS)
@@ -1484,6 +1490,10 @@ if(Boost_FOUND)
list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
endif()
endforeach()
+ if(_Boost_MISSING_COMPONENTS AND _Boost_EXTRA_FIND_COMPONENTS)
+ # Optional indirect dependencies are not counted as missing.
+ list(REMOVE_ITEM _Boost_MISSING_COMPONENTS ${_Boost_EXTRA_FIND_COMPONENTS})
+ endif()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index ca49e4a..a7ffcfe 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -82,8 +82,7 @@
# ``AUTO`` to find them from executable target
#
# However, note that this macro will slow down your tests by running
-# an executable for each test and test fixture. You will also have to
-# re-run CMake after adding or removing tests or test fixtures.
+# an executable for each test and test fixture.
#
# Example usage::
#
@@ -119,6 +118,7 @@ function(GTEST_ADD_TESTS executable extra_args)
set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*")
set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)")
foreach(source ${ARGN})
+ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source})
file(READ "${source}" contents)
string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
foreach(hit ${found_tests})
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 3c4b95c..b021ffd 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 5)
-set(CMake_VERSION_PATCH 20160314)
+set(CMake_VERSION_PATCH 20160317)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx
index 54c27d6..e670991 100644
--- a/Source/cmCreateTestSourceList.cxx
+++ b/Source/cmCreateTestSourceList.cxx
@@ -78,8 +78,7 @@ bool cmCreateTestSourceList
driver += *i;
++i;
- std::string configFile =
- this->Makefile->GetRequiredDefinition("CMAKE_ROOT");
+ std::string configFile = cmSystemTools::GetCMakeRoot();
configFile += "/Templates/TestDriver.cxx.in";
// Create the test driver file
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index ed0c69c..476d3ac 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -259,13 +259,12 @@ void cmExtraCodeBlocksGenerator
}
// Convert
- const char* cmakeRoot = mf->GetDefinition("CMAKE_ROOT");
for (std::vector<std::string>::const_iterator jt = listFiles.begin();
jt != listFiles.end();
++jt)
{
// don't put cmake's own files into the project (#12110):
- if (jt->find(cmakeRoot) == 0)
+ if (jt->find(cmSystemTools::GetCMakeRoot()) == 0)
{
continue;
}
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ff12320..d7c2782 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3909,8 +3909,7 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender,
std::vector<std::string> props;
cmSystemTools::ExpandListArgument(prop, props);
- std::string pdir =
- dependee->Target->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT");
+ std::string pdir = cmSystemTools::GetCMakeRoot();
pdir += "/Help/prop_tgt/";
for(std::vector<std::string>::iterator pi = props.begin();
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index c628406..1d0ade4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -820,7 +820,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
// Now load files that can override any settings on the platform or for
// the project First load the project compatibility file if it is in
// cmake
- std::string projectCompatibility = mf->GetDefinition("CMAKE_ROOT");
+ std::string projectCompatibility = cmSystemTools::GetCMakeRoot();
projectCompatibility += "/Modules/";
projectCompatibility += mf->GetSafeDefinition("PROJECT_NAME");
projectCompatibility += "Compatibility.cmake";
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 6a1aa29..00bb511 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -184,12 +184,11 @@ void RegisterVisualStudioMacros(const std::string& macrosFile,
//----------------------------------------------------------------------------
void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros()
{
- cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
std::string dir = this->GetUserMacrosDirectory();
if (dir != "")
{
- std::string src = mf->GetRequiredDefinition("CMAKE_ROOT");
+ std::string src = cmSystemTools::GetCMakeRoot();
src += "/Templates/" CMAKE_VSMACROS_FILENAME;
std::string dst = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME;
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index adfbe2a..3e5611b 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1012,6 +1012,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
this->OutputTargetRules(fout, configName, target, libName);
this->OutputBuildTool(fout, configName, target, targetOptions);
+ this->OutputDeploymentDebuggerTool(fout, configName, target);
fout << "\t\t</Configuration>\n";
}
@@ -1374,6 +1375,31 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
}
}
+void cmLocalVisualStudio7Generator::OutputDeploymentDebuggerTool(
+ std::ostream& fout, std::string const& config, cmGeneratorTarget* target)
+{
+ if (this->WindowsCEProject)
+ {
+ if (const char* dir = target->GetProperty("DEPLOYMENT_REMOTE_DIRECTORY"))
+ {
+ fout <<
+ "\t\t\t<DeploymentTool\n"
+ "\t\t\t\tForceDirty=\"-1\"\n"
+ "\t\t\t\tRemoteDirectory=\"" << this->EscapeForXML(dir) << "\"\n"
+ "\t\t\t\tRegisterOutput=\"0\"\n"
+ "\t\t\t\tAdditionalFiles=\"\"/>\n"
+ ;
+ std::string const exe = dir + std::string("\\") + target->GetFullName();
+ fout <<
+ "\t\t\t<DebuggerTool\n"
+ "\t\t\t\tRemoteExecutable=\"" << this->EscapeForXML(exe) << "\"\n"
+ "\t\t\t\tArguments=\"\"\n"
+ "\t\t\t/>\n"
+ ;
+ }
+ }
+}
+
//----------------------------------------------------------------------------
void
cmLocalVisualStudio7Generator
diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h
index 7bb9cc6..562f485 100644
--- a/Source/cmLocalVisualStudio7Generator.h
+++ b/Source/cmLocalVisualStudio7Generator.h
@@ -92,6 +92,9 @@ private:
const std::string& libName);
void OutputBuildTool(std::ostream& fout, const std::string& configName,
cmGeneratorTarget* t, const Options& targetOptions);
+ void OutputDeploymentDebuggerTool(std::ostream& fout,
+ std::string const& config,
+ cmGeneratorTarget* target);
void OutputLibraryDirectories(std::ostream& fout,
std::vector<std::string> const& dirs);
void WriteProjectSCC(std::ostream& fout, cmGeneratorTarget *target);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8f59e2c..1df5cec 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3738,17 +3738,13 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
}
// Always search in the standard modules location.
- const char* cmakeRoot = this->GetDefinition("CMAKE_ROOT");
- if(cmakeRoot)
- {
- moduleInCMakeRoot = cmakeRoot;
- moduleInCMakeRoot += "/Modules/";
- moduleInCMakeRoot += filename;
- cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot);
- if(!cmSystemTools::FileExists(moduleInCMakeRoot.c_str()))
- {
- moduleInCMakeRoot = "";
- }
+ moduleInCMakeRoot = cmSystemTools::GetCMakeRoot();
+ moduleInCMakeRoot += "/Modules/";
+ moduleInCMakeRoot += filename;
+ cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot);
+ if(!cmSystemTools::FileExists(moduleInCMakeRoot.c_str()))
+ {
+ moduleInCMakeRoot = "";
}
// Normally, prefer the files found in CMAKE_MODULE_PATH. Only when the file
@@ -3763,7 +3759,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
if (!moduleInCMakeModulePath.empty() && !moduleInCMakeRoot.empty())
{
const char* currentFile = this->GetDefinition("CMAKE_CURRENT_LIST_FILE");
- std::string mods = cmakeRoot + std::string("/Modules/");
+ std::string mods = cmSystemTools::GetCMakeRoot() + "/Modules/";
if (currentFile && strncmp(currentFile, mods.c_str(), mods.size()) == 0)
{
switch (this->GetPolicyStatus(cmPolicies::CMP0017))
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 08caea3..4cab81f 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -1003,8 +1003,7 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget(
SetupAutoRccTarget(target);
}
- const char* cmakeRoot = makefile->GetSafeDefinition("CMAKE_ROOT");
- std::string inputFile = cmakeRoot;
+ std::string inputFile = cmSystemTools::GetCMakeRoot();
inputFile += "/Modules/AutogenInfo.cmake.in";
std::string outputFile = targetDir;
outputFile += "/AutogenInfo.cmake";
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 74364f7..dcc95af 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2409,8 +2409,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
// we have to find the module directory, so we can copy the files
this->AddCMakePaths();
- std::string modulesPath =
- this->State->GetInitializedCacheValue("CMAKE_ROOT");
+ std::string modulesPath = cmSystemTools::GetCMakeRoot();
modulesPath += "/Modules";
std::string inFile = modulesPath;
inFile += "/SystemInformation.cmake";