summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/FindVTK.rst6
-rw-r--r--Modules/FindCUDA.cmake14
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake4
-rw-r--r--Modules/FindJNI.cmake2
-rw-r--r--Modules/FindVTK.cmake112
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmArchiveWrite.cxx26
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx44
-rw-r--r--Source/cmGlobalNinjaGenerator.h9
-rw-r--r--Source/cmNinjaTargetGenerator.cxx32
-rw-r--r--Source/cmNinjaTargetGenerator.h3
-rw-r--r--Source/cmSystemTools.cxx38
-rw-r--r--Tests/RunCMake/File_Generate/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/File_Generate/EmptyCondition1-stderr.txt2
-rw-r--r--Tests/RunCMake/File_Generate/EmptyCondition2-stderr.txt2
-rw-r--r--Tests/RunCMake/File_Generate/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/RunCMake.cmake5
-rw-r--r--Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake2
-rw-r--r--Tests/RunCMake/include_directories/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/include_directories/DebugIncludes-stderr.txt12
-rw-r--r--Tests/RunCMake/include_directories/DebugIncludes.cmake2
-rw-r--r--Tests/RunCMake/include_directories/DirInInstallPrefix.cmake2
-rw-r--r--Tests/RunCMake/include_directories/ImportedTarget.cmake2
-rw-r--r--Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake2
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInGenex.cmake2
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInInterface.cmake2
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake40
-rw-r--r--Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake2
-rw-r--r--Tests/RunCMake/include_directories/TID-bad-target-stderr.txt2
-rw-r--r--Tests/RunCMake/include_directories/export-NOWARN.cmake2
-rw-r--r--Tests/RunCMake/include_directories/incomplete-genex.cmake2
31 files changed, 188 insertions, 203 deletions
diff --git a/Help/release/dev/FindVTK.rst b/Help/release/dev/FindVTK.rst
new file mode 100644
index 0000000..1cc9fc4
--- /dev/null
+++ b/Help/release/dev/FindVTK.rst
@@ -0,0 +1,6 @@
+FindVTK
+-------
+
+* The :module:`FindVTK` module dropped support for finding VTK 4.0.
+ It is now a thin-wrapper around ``find_package(VTK ... NO_MODULE)``.
+ This produces much clearer error messages when VTK is not found.
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d9809ad..9348aa5 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -452,7 +452,17 @@ set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.")
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(CUDA_HOST_COMPILER "$(VCInstallDir)bin" CACHE FILEPATH "Host side compiler used by NVCC")
else()
- set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "Host side compiler used by NVCC")
+ # Using cc which is symlink to clang may let NVCC think it is GCC and issue
+ # unhandled -dumpspecs option to clang. Also in case neither
+ # CMAKE_C_COMPILER is defined (project does not use C language) nor
+ # CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let
+ # nvcc use its own default C compiler.
+ if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER)
+ get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH)
+ else()
+ set(c_compiler_realpath "")
+ endif()
+ set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC")
endif()
# Propagate the host flags to the host compiler via -Xcompiler
@@ -1422,7 +1432,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
# If -ccbin, --compiler-bindir has been specified, don't do anything. Otherwise add it here.
list( FIND nvcc_flags "-ccbin" ccbin_found0 )
list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 )
- if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 )
+ if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
endif()
# Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG}
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index f0aac84..58e0d31 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -62,7 +62,7 @@ set(cmake_dependency_file "@cmake_dependency_file@") # path
set(CUDA_make2cmake "@CUDA_make2cmake@") # path
set(CUDA_parse_cubin "@CUDA_parse_cubin@") # path
set(build_cubin @build_cubin@) # bool
-set(CUDA_HOST_COMPILER "@CUDA_HOST_COMPILER@") # bool
+set(CUDA_HOST_COMPILER "@CUDA_HOST_COMPILER@") # path
# We won't actually use these variables for now, but we need to set this, in
# order to force this file to be run again if it changes.
set(generated_file_path "@generated_file_path@") # path
@@ -106,7 +106,7 @@ list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
# Any -ccbin existing in CUDA_NVCC_FLAGS gets highest priority
list( FIND CUDA_NVCC_FLAGS "-ccbin" ccbin_found0 )
list( FIND CUDA_NVCC_FLAGS "--compiler-bindir" ccbin_found1 )
-if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 )
+if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
if (CUDA_HOST_COMPILER STREQUAL "$(VCInstallDir)bin" AND DEFINED CCBIN)
set(CCBIN -ccbin "${CCBIN}")
else()
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 6a496af..3dcb0d0 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -55,7 +55,7 @@ macro(java_append_library_directories _var)
# endianess of the underlying system.
set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le")
- set(_java_libarch "ppc64le")
+ set(_java_libarch "ppc64" "ppc64le")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
set(_java_libarch "ppc64" "ppc")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake
index bcc7f87..60f48dd 100644
--- a/Modules/FindVTK.cmake
+++ b/Modules/FindVTK.cmake
@@ -10,18 +10,6 @@
# ::
#
# VTK_FOUND - Set to true when VTK is found.
-# VTK_USE_FILE - CMake file to use VTK.
-# VTK_MAJOR_VERSION - The VTK major version number.
-# VTK_MINOR_VERSION - The VTK minor version number
-# (odd non-release).
-# VTK_BUILD_VERSION - The VTK patch level
-# (meaningless for odd minor).
-# VTK_INCLUDE_DIRS - Include directories for VTK
-# VTK_LIBRARY_DIRS - Link directories for VTK libraries
-# VTK_KITS - List of VTK kits, in CAPS
-# (COMMON,IO,) etc.
-# VTK_LANGUAGES - List of wrapped languages, in CAPS
-# (TCL, PYHTON,) etc.
#
# The following cache entries must be set by the user to locate VTK:
#
@@ -43,7 +31,7 @@
# instead.
#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
+# Copyright 2001-2014 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -55,102 +43,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-# Assume not found.
-set(VTK_FOUND 0)
-
-# VTK 4.0 did not provide VTKConfig.cmake.
-if("${VTK_FIND_VERSION}" VERSION_LESS 4.1)
- set(_VTK_40_ALLOW 1)
- if(VTK_FIND_VERSION)
- set(_VTK_40_ONLY 1)
- endif()
-endif()
-
-# Construct consistent error messages for use below.
-set(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.")
-if(_VTK_40_ALLOW)
- set(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
-endif()
-set(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${VTK_DIR_DESCRIPTION}")
-
-# Check whether VTK 4.0 has already been found.
-if(_VTK_40_ALLOW AND VTK_DIR)
- if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
- set(VTK_FOUND 1)
- include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
- endif()
-endif()
-
# Use the Config mode of the find_package() command to find VTKConfig.
# If this succeeds (possibly because VTK_DIR is already set), the
# command will have already loaded VTKConfig.cmake and set VTK_FOUND.
-if(NOT _VTK_40_ONLY AND NOT VTK_FOUND)
- find_package(VTK QUIET NO_MODULE)
-endif()
-
-# Special search for VTK 4.0.
-if(_VTK_40_ALLOW AND NOT VTK_DIR)
- # Old scripts may set these directories in the CMakeCache.txt file.
- # They can tell us where to find VTKConfig.cmake.
- set(VTK_DIR_SEARCH_LEGACY "")
- if(VTK_BINARY_PATH AND USE_BUILT_VTK)
- set(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY} ${VTK_BINARY_PATH})
- endif()
- if(VTK_INSTALL_PATH AND USE_INSTALLED_VTK)
- set(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY}
- ${VTK_INSTALL_PATH}/lib/vtk)
+if(NOT VTK_FOUND)
+ set(_VTK_REQUIRED "")
+ if(VTK_FIND_REQUIRED)
+ set(_VTK_REQUIRED REQUIRED)
endif()
-
- # Look for UseVTK.cmake in build trees or under <prefix>/include/vtk.
- find_path(VTK_DIR
- NAMES UseVTK.cmake
- PATH_SUFFIXES vtk-4.0 vtk
- HINTS ENV VTK_DIR
-
- PATHS
-
- # Support legacy cache files.
- ${VTK_DIR_SEARCH_LEGACY}
-
- # Read from the CMakeSetup registry entries. It is likely that
- # VTK will have been recently built.
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
- # Help the user find it if we cannot.
- DOC "The ${VTK_DIR_DESCRIPTION}"
- )
-
- if(VTK_DIR)
- if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
- set(VTK_FOUND 1)
- include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
- else()
- # We found the wrong version. Pretend we did not find it.
- set(VTK_DIR "VTK_DIR-NOTFOUND" CACHE PATH "The ${VTK_DIR_DESCRIPTION}" FORCE)
- endif()
+ set(_VTK_QUIET "")
+ if(VTK_FIND_QUIETLY)
+ set(_VTK_QUIET QUIET)
endif()
+ find_package(VTK ${_VTK_REQUIRED} ${_VTK_QUIET} NO_MODULE)
+ unset(_VTK_REQUIRED)
+ unset(_VTK_QUIET)
endif()
-#-----------------------------------------------------------------------------
if(VTK_FOUND)
# Set USE_VTK_FILE for backward-compatibility.
set(USE_VTK_FILE ${VTK_USE_FILE})
-else()
- # VTK not found, explain to the user how to specify its location.
- if(VTK_FIND_REQUIRED)
- message(FATAL_ERROR ${VTK_DIR_MESSAGE})
- else()
- if(NOT VTK_FIND_QUIETLY)
- message(STATUS ${VTK_DIR_MESSAGE})
- endif()
- endif()
endif()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index f5e0bc1..27405be 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 0)
-set(CMake_VERSION_PATCH 20140701)
+set(CMake_VERSION_PATCH 20140702)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index 58f7573..3b0ead5 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -25,6 +25,28 @@ static std::string cm_archive_error_string(struct archive* a)
}
//----------------------------------------------------------------------------
+static void cm_archive_entry_copy_pathname(struct archive_entry* e,
+ const std::string& dest)
+{
+#if cmsys_STL_HAS_WSTRING
+ archive_entry_copy_pathname_w(e, cmsys::Encoding::ToWide(dest).c_str());
+#else
+ archive_entry_copy_pathname(e, dest.c_str());
+#endif
+}
+
+//----------------------------------------------------------------------------
+static void cm_archive_entry_copy_sourcepath(struct archive_entry* e,
+ const std::string& file)
+{
+#if cmsys_STL_HAS_WSTRING
+ archive_entry_copy_sourcepath_w(e, cmsys::Encoding::ToWide(file).c_str());
+#else
+ archive_entry_copy_sourcepath(e, file.c_str());
+#endif
+}
+
+//----------------------------------------------------------------------------
class cmArchiveWrite::Entry
{
struct archive_entry* Object;
@@ -237,8 +259,8 @@ bool cmArchiveWrite::AddFile(const char* file,
std::cout << dest << "\n";
}
Entry e;
- archive_entry_copy_sourcepath(e, file);
- archive_entry_set_pathname(e, dest.c_str());
+ cm_archive_entry_copy_sourcepath(e, file);
+ cm_archive_entry_copy_pathname(e, dest);
if(archive_read_disk_entry_from_file(this->Disk, e, -1, 0) != ARCHIVE_OK)
{
this->Error = "archive_read_disk_entry_from_file: ";
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 0facfeb..09ee128 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -151,11 +151,6 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
++i)
{
arguments += " " + EncodeIdent(EncodePath(*i), os);
-
- //we need to track every dependency that comes in, since we are trying
- //to find dependencies that are side effects of build commands
- //
- this->CombinedBuildExplicitDependencies.insert( EncodePath(*i) );
}
// Write implicit dependencies.
@@ -280,6 +275,13 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
cmNinjaDeps(),
orderOnly,
vars);
+
+ //we need to track every dependency that comes in, since we are trying
+ //to find dependencies that are side effects of build commands
+ for(cmNinjaDeps::const_iterator i = deps.begin(); i != deps.end(); ++i)
+ {
+ this->CombinedCustomCommandExplicitDependencies.insert( EncodePath(*i) );
+ }
}
void
@@ -1015,43 +1017,33 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
//to keep this data around
this->CombinedBuildOutputs.clear();
- //now we difference with CombinedBuildExplicitDependencies to find
+ //now we difference with CombinedCustomCommandExplicitDependencies to find
//the list of items we know nothing about.
- //We have encoded all the paths in CombinedBuildExplicitDependencies
+ //We have encoded all the paths in CombinedCustomCommandExplicitDependencies
//and knownDependencies so no matter if unix or windows paths they
//should all match now.
std::vector<std::string> unkownExplicitDepends;
- this->CombinedBuildExplicitDependencies.erase("all");
+ this->CombinedCustomCommandExplicitDependencies.erase("all");
- std::set_difference(this->CombinedBuildExplicitDependencies.begin(),
- this->CombinedBuildExplicitDependencies.end(),
+ std::set_difference(this->CombinedCustomCommandExplicitDependencies.begin(),
+ this->CombinedCustomCommandExplicitDependencies.end(),
knownDependencies.begin(),
knownDependencies.end(),
std::back_inserter(unkownExplicitDepends));
- std::string const rootBuildDirectory =
- this->GetCMakeInstance()->GetHomeOutputDirectory();
for (std::vector<std::string>::const_iterator
i = unkownExplicitDepends.begin();
i != unkownExplicitDepends.end();
++i)
{
- //verify the file is in the build directory
- std::string const absDepPath = cmSystemTools::CollapseFullPath(
- i->c_str(), rootBuildDirectory.c_str());
- bool const inBuildDir = cmSystemTools::IsSubDirectory(absDepPath.c_str(),
- rootBuildDirectory.c_str());
- if(inBuildDir)
- {
- cmNinjaDeps deps(1,*i);
- this->WritePhonyBuild(os,
- "",
- deps,
- deps);
- }
- }
+ cmNinjaDeps deps(1,*i);
+ this->WritePhonyBuild(os,
+ "",
+ deps,
+ deps);
+ }
}
void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os)
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index f2643af..ff110d7 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -363,10 +363,11 @@ private:
/// The set of custom command outputs we have seen.
std::set<std::string> CustomCommandOutputs;
- //The combined explicit dependencies of all build commands that the global
- //generator has issued. When combined with CombinedBuildOutputs it allows
- //us to detect the set of explicit dependencies that have
- std::set<std::string> CombinedBuildExplicitDependencies;
+ /// The combined explicit dependencies of custom build commands
+ std::set<std::string> CombinedCustomCommandExplicitDependencies;
+
+ /// When combined with CombinedCustomCommandExplicitDependencies it allows
+ /// us to detect the set of explicit dependencies that have
std::set<std::string> CombinedBuildOutputs;
/// The mapping from source file to assumed dependencies.
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 24689fb..816e6d8 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -542,22 +542,24 @@ cmNinjaTargetGenerator
std::back_inserter(orderOnlyDeps), MapToNinjaPath());
}
- cmNinjaDeps orderOnlyTarget;
- orderOnlyTarget.push_back(this->OrderDependsTargetForTarget());
- this->GetGlobalGenerator()->WritePhonyBuild(this->GetBuildFileStream(),
- "Order-only phony target for "
- + this->GetTargetName(),
- orderOnlyTarget,
- cmNinjaDeps(),
- cmNinjaDeps(),
- orderOnlyDeps);
-
+ if (!orderOnlyDeps.empty())
+ {
+ cmNinjaDeps orderOnlyTarget;
+ orderOnlyTarget.push_back(this->OrderDependsTargetForTarget());
+ this->GetGlobalGenerator()->WritePhonyBuild(this->GetBuildFileStream(),
+ "Order-only phony target for "
+ + this->GetTargetName(),
+ orderOnlyTarget,
+ cmNinjaDeps(),
+ cmNinjaDeps(),
+ orderOnlyDeps);
+ }
std::vector<cmSourceFile const*> objectSources;
this->GeneratorTarget->GetObjectSources(objectSources, config);
for(std::vector<cmSourceFile const*>::const_iterator
si = objectSources.begin(); si != objectSources.end(); ++si)
{
- this->WriteObjectBuildStatement(*si);
+ this->WriteObjectBuildStatement(*si, !orderOnlyDeps.empty());
}
std::string def = this->GeneratorTarget->GetModuleDefinitionFile(config);
if(!def.empty())
@@ -570,7 +572,8 @@ cmNinjaTargetGenerator
void
cmNinjaTargetGenerator
-::WriteObjectBuildStatement(cmSourceFile const* source)
+::WriteObjectBuildStatement(
+ cmSourceFile const* source, bool writeOrderDependsTargetForTarget)
{
std::string comment;
const std::string language = source->GetLanguage();
@@ -599,7 +602,10 @@ cmNinjaTargetGenerator
}
cmNinjaDeps orderOnlyDeps;
- orderOnlyDeps.push_back(this->OrderDependsTargetForTarget());
+ if (writeOrderDependsTargetForTarget)
+ {
+ orderOnlyDeps.push_back(this->OrderDependsTargetForTarget());
+ }
// If the source file is GENERATED and does not have a custom command
// (either attached to this source file or another one), assume that one of
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 94c420f..40a15a3 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -114,7 +114,8 @@ protected:
void WriteLanguageRules(const std::string& language);
void WriteCompileRule(const std::string& language);
void WriteObjectBuildStatements();
- void WriteObjectBuildStatement(cmSourceFile const* source);
+ void WriteObjectBuildStatement(cmSourceFile const* source,
+ bool writeOrderDependsTargetForTarget);
void WriteCustomCommandBuildStatement(cmCustomCommand *cc);
cmNinjaDeps GetObjects() const
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0ab722e..12a63b0 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -91,6 +91,31 @@ extern char** environ;
# endif
#endif
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+static std::string
+cm_archive_entry_pathname(struct archive_entry *entry)
+{
+#if cmsys_STL_HAS_WSTRING
+ return cmsys::Encoding::ToNarrow(
+ archive_entry_pathname_w(entry)).c_str();
+#else
+ return archive_entry_pathname(entry);
+#endif
+}
+
+static int cm_archive_read_open_file(struct archive* a,
+ const char* file,
+ int block_size)
+{
+#if cmsys_STL_HAS_WSTRING
+ std::wstring wfile = cmsys::Encoding::ToWide(file);
+ return archive_read_open_filename_w(a, wfile.c_str(), block_size);
+#else
+ return archive_read_open_filename(a, file, block_size);
+#endif
+}
+#endif
+
#ifdef _WIN32
class cmSystemToolsWindowsHandle
{
@@ -1581,7 +1606,7 @@ namespace{
}
strftime(tmp, sizeof(tmp), fmt, localtime(&tim));
fprintf(out, " %s ", tmp);
- fprintf(out, "%s", archive_entry_pathname(entry));
+ fprintf(out, "%s", cm_archive_entry_pathname(entry).c_str());
/* Extra information for links. */
if (archive_entry_hardlink(entry)) /* Hard link */
@@ -1641,7 +1666,7 @@ bool extract_tar(const char* outFileName, bool verbose,
archive_read_support_compression_all(a);
archive_read_support_format_all(a);
struct archive_entry *entry;
- int r = archive_read_open_file(a, outFileName, 10240);
+ int r = cm_archive_read_open_file(a, outFileName, 10240);
if(r)
{
cmSystemTools::Error("Problem with archive_read_open_file(): ",
@@ -1666,7 +1691,7 @@ bool extract_tar(const char* outFileName, bool verbose,
if(extract)
{
cmSystemTools::Stdout("x ");
- cmSystemTools::Stdout(archive_entry_pathname(entry));
+ cmSystemTools::Stdout(cm_archive_entry_pathname(entry).c_str());
}
else
{
@@ -1676,7 +1701,7 @@ bool extract_tar(const char* outFileName, bool verbose,
}
else if(!extract)
{
- cmSystemTools::Stdout(archive_entry_pathname(entry));
+ cmSystemTools::Stdout(cm_archive_entry_pathname(entry).c_str());
cmSystemTools::Stdout("\n");
}
if(extract)
@@ -1706,7 +1731,8 @@ bool extract_tar(const char* outFileName, bool verbose,
else if(const char* linktext = archive_entry_symlink(entry))
{
std::cerr << "cmake -E tar: warning: skipping symbolic link \""
- << archive_entry_pathname(entry) << "\" -> \""
+ << cm_archive_entry_pathname(entry)
+ << "\" -> \""
<< linktext << "\"." << std::endl;
}
#endif
@@ -1715,7 +1741,7 @@ bool extract_tar(const char* outFileName, bool verbose,
cmSystemTools::Error("Problem with archive_write_header(): ",
archive_error_string(ext));
cmSystemTools::Error("Current file: ",
- archive_entry_pathname(entry));
+ cm_archive_entry_pathname(entry).c_str());
break;
}
}
diff --git a/Tests/RunCMake/File_Generate/CMakeLists.txt b/Tests/RunCMake/File_Generate/CMakeLists.txt
index 12cd3c7..bc0cf5d 100644
--- a/Tests/RunCMake/File_Generate/CMakeLists.txt
+++ b/Tests/RunCMake/File_Generate/CMakeLists.txt
@@ -1,3 +1,6 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake)
+if(NOT TEST_FILE)
+ set(TEST_FILE ${RunCMake_TEST}.cmake)
+endif()
+include(${TEST_FILE})
diff --git a/Tests/RunCMake/File_Generate/EmptyCondition1-stderr.txt b/Tests/RunCMake/File_Generate/EmptyCondition1-stderr.txt
index 9fe39cc..e823b25 100644
--- a/Tests/RunCMake/File_Generate/EmptyCondition1-stderr.txt
+++ b/Tests/RunCMake/File_Generate/EmptyCondition1-stderr.txt
@@ -1,4 +1,4 @@
CMake Error at EmptyCondition1.cmake:2 \(file\):
file Incorrect arguments to GENERATE subcommand.
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/File_Generate/EmptyCondition2-stderr.txt b/Tests/RunCMake/File_Generate/EmptyCondition2-stderr.txt
index 73d5f25..b042946 100644
--- a/Tests/RunCMake/File_Generate/EmptyCondition2-stderr.txt
+++ b/Tests/RunCMake/File_Generate/EmptyCondition2-stderr.txt
@@ -1,4 +1,4 @@
CMake Error at EmptyCondition2.cmake:2 \(file\):
file CONDITION of sub-command GENERATE must not be empty if specified.
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
index f23fa19..f74d17e 100644
--- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
@@ -12,10 +12,10 @@ run_cmake(DebugEvaluate)
set(timeformat "%Y%j%H%M%S")
file(REMOVE "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt")
-set(RunCMake_TEST_FILE "WriteIfDifferent")
+set(RunCMake_TEST_OPTIONS "-DTEST_FILE=WriteIfDifferent.cmake")
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/WriteIfDifferent-build")
run_cmake(WriteIfDifferent-prepare)
-unset(RunCMake_TEST_FILE)
+unset(RunCMake_TEST_OPTIONS)
unset(RunCMake_TEST_BINARY_DIR)
file(TIMESTAMP "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt" timestamp ${timeformat})
if(NOT timestamp)
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 4ed2f43..2020356 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -38,9 +38,6 @@ function(run_cmake test)
if(NOT DEFINED RunCMake_TEST_OPTIONS)
set(RunCMake_TEST_OPTIONS "")
endif()
- if (NOT RunCMake_TEST_FILE)
- set(RunCMake_TEST_FILE "${test}")
- endif()
if(APPLE)
list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
endif()
@@ -57,7 +54,7 @@ function(run_cmake test)
COMMAND ${CMAKE_COMMAND} "${RunCMake_TEST_SOURCE_DIR}"
-G "${RunCMake_GENERATOR}"
-T "${RunCMake_GENERATOR_TOOLSET}"
- -DRunCMake_TEST=${RunCMake_TEST_FILE}
+ -DRunCMake_TEST=${test}
--no-warn-unused-cli
${RunCMake_TEST_OPTIONS}
WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
diff --git a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake b/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake
index 8754540..67ee7de 100644
--- a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake
+++ b/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake
@@ -1,5 +1,5 @@
-project(BinaryDirectoryInInterface)
+enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
target_include_directories(testTarget INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/foo")
diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt
index 3482e6b..5cd4825 100644
--- a/Tests/RunCMake/include_directories/CMakeLists.txt
+++ b/Tests/RunCMake/include_directories/CMakeLists.txt
@@ -1,3 +1,6 @@
cmake_minimum_required(VERSION 3.0)
-project(${RunCMake_TEST} CXX)
-include(${RunCMake_TEST}.cmake)
+project(${RunCMake_TEST} NONE)
+if(NOT TEST_FILE)
+ set(TEST_FILE ${RunCMake_TEST}.cmake)
+endif()
+include(${TEST_FILE})
diff --git a/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt b/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt
index 71e6456..8dff90f 100644
--- a/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt
+++ b/Tests/RunCMake/include_directories/DebugIncludes-stderr.txt
@@ -5,7 +5,7 @@ CMake Debug Log at DebugIncludes.cmake:8 \(include_directories\):
\* .*/Tests/RunCMake/include_directories/two
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
CMake Debug Log at DebugIncludes.cmake:13 \(set_property\):
Used includes for target lll:
@@ -13,7 +13,7 @@ CMake Debug Log at DebugIncludes.cmake:13 \(set_property\):
\* .*/Tests/RunCMake/include_directories/three
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
CMake Debug Log at DebugIncludes.cmake:18 \(include_directories\):
Used includes for target lll:
@@ -21,7 +21,7 @@ CMake Debug Log at DebugIncludes.cmake:18 \(include_directories\):
\* .*/Tests/RunCMake/include_directories/four
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
CMake Debug Log at DebugIncludes.cmake:33 \(set_property\):
Used includes for target lll:
@@ -33,7 +33,7 @@ CMake Debug Log at DebugIncludes.cmake:33 \(set_property\):
Call Stack \(most recent call first\):
DebugIncludes.cmake:44 \(some_macro\)
DebugIncludes.cmake:47 \(some_function\)
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
CMake Debug Log at DebugIncludes.cmake:30 \(target_link_libraries\):
Used includes for target lll:
@@ -41,7 +41,7 @@ CMake Debug Log at DebugIncludes.cmake:30 \(target_link_libraries\):
\* .*/Tests/RunCMake/include_directories/eight
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
CMake Debug Log at DebugIncludes.cmake:55 \(set_property\):
Used includes for target lll:
@@ -50,4 +50,4 @@ CMake Debug Log at DebugIncludes.cmake:55 \(set_property\):
\* .*/Tests/RunCMake/include_directories/ten
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/include_directories/DebugIncludes.cmake b/Tests/RunCMake/include_directories/DebugIncludes.cmake
index bbc9e46..10a4c50 100644
--- a/Tests/RunCMake/include_directories/DebugIncludes.cmake
+++ b/Tests/RunCMake/include_directories/DebugIncludes.cmake
@@ -1,5 +1,5 @@
-project(DebugIncludes)
+enable_language(CXX)
set(CMAKE_DEBUG_TARGET_PROPERTIES INCLUDE_DIRECTORIES)
diff --git a/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake b/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake
index d6f08bd..fab7717 100644
--- a/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake
+++ b/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake
@@ -1,4 +1,4 @@
-
+enable_language(CXX)
add_library(testTarget empty.cpp)
target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/dir")
diff --git a/Tests/RunCMake/include_directories/ImportedTarget.cmake b/Tests/RunCMake/include_directories/ImportedTarget.cmake
index e1a20b1..f752f98 100644
--- a/Tests/RunCMake/include_directories/ImportedTarget.cmake
+++ b/Tests/RunCMake/include_directories/ImportedTarget.cmake
@@ -1,5 +1,5 @@
-project(ImportedTarget)
+enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
diff --git a/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake b/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake
index 0f08e58..8d777f5 100644
--- a/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake
+++ b/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake
@@ -1,5 +1,5 @@
-project(InstallPrefixInInterface)
+enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/foo")
diff --git a/Tests/RunCMake/include_directories/RelativePathInGenex.cmake b/Tests/RunCMake/include_directories/RelativePathInGenex.cmake
index f72cf3a..070a381 100644
--- a/Tests/RunCMake/include_directories/RelativePathInGenex.cmake
+++ b/Tests/RunCMake/include_directories/RelativePathInGenex.cmake
@@ -1,5 +1,5 @@
-project(RelativePathInInterface)
+enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<1:foo>")
diff --git a/Tests/RunCMake/include_directories/RelativePathInInterface.cmake b/Tests/RunCMake/include_directories/RelativePathInInterface.cmake
index f2ce54a..4c4727d 100644
--- a/Tests/RunCMake/include_directories/RelativePathInInterface.cmake
+++ b/Tests/RunCMake/include_directories/RelativePathInInterface.cmake
@@ -1,5 +1,5 @@
-project(RelativePathInInterface)
+enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "foo")
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index c5b29d0..fa76f24 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -31,19 +31,22 @@ configure_file(
"${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface.cmake"
COPYONLY
)
-set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface/prefix")
-set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface")
+set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface/prefix"
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface.cmake"
+ )
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/copy")
run_cmake(InstallInSrcDir)
unset(RunCMake_TEST_SOURCE_DIR)
-unset(RunCMake_TEST_FILE)
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix")
+set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix"
+ "-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
+ )
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/InstallInBinDir-build")
-set(RunCMake_TEST_FILE "${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface")
run_cmake(InstallInBinDir)
unset(RunCMake_TEST_BINARY_DIR)
-unset(RunCMake_TEST_FILE)
configure_file(
"${RunCMake_SOURCE_DIR}/CMakeLists.txt"
@@ -68,22 +71,25 @@ foreach(policyStatus "" NEW OLD)
unset(policyOption)
set(policyStatus WARN)
endif()
- set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption})
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption}
+ "-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
+ )
# Set the RunCMake_TEST_SOURCE_DIR here to the copy too. This is needed to run
# the test suite in-source properly. Otherwise the install directory would be
# a subdirectory or the source directory, which is allowed and tested separately
# below.
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/prefix/src")
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/prefix/BinInInstallPrefix-CMP0052-${policyStatus}-build")
- set(RunCMake_TEST_FILE "${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface")
run_cmake(BinInInstallPrefix-CMP0052-${policyStatus})
unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_FILE)
- set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface")
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption}
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface.cmake"
+ )
run_cmake(SrcInInstallPrefix-CMP0052-${policyStatus})
unset(RunCMake_TEST_SOURCE_DIR)
- unset(RunCMake_TEST_FILE)
endforeach()
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallPrefixInInterface-build/prefix")
@@ -104,12 +110,13 @@ configure_file(
"${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface.cmake"
COPYONLY
)
-set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface/prefix")
-set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface")
+set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface/prefix"
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface.cmake"
+ )
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrc")
run_cmake(InstallToPrefixInSrcDirOutOfSource)
unset(RunCMake_TEST_SOURCE_DIR)
-unset(RunCMake_TEST_FILE)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/installToSrcInSrc")
@@ -131,12 +138,13 @@ configure_file(
COPYONLY
)
-set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface/prefix")
-set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface")
+set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface/prefix"
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface.cmake"
+ )
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc")
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc")
run_cmake(InstallToPrefixInSrcDirInSource)
unset(RunCMake_TEST_SOURCE_DIR)
unset(RunCMake_TEST_BINARY_DIR)
-unset(RunCMake_TEST_FILE)
unset(RunCMake_TEST_NO_CLEAN)
diff --git a/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake b/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake
index c9a9c45..f814a3c 100644
--- a/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake
+++ b/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake
@@ -1,5 +1,5 @@
-project(SourceDirectoryInInterface)
+enable_language(CXX)
add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
target_include_directories(testTarget INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/foo")
diff --git a/Tests/RunCMake/include_directories/TID-bad-target-stderr.txt b/Tests/RunCMake/include_directories/TID-bad-target-stderr.txt
index 481e358..4e15de1 100644
--- a/Tests/RunCMake/include_directories/TID-bad-target-stderr.txt
+++ b/Tests/RunCMake/include_directories/TID-bad-target-stderr.txt
@@ -1,4 +1,4 @@
CMake Error at TID-bad-target.cmake:6 \(target_include_directories\):
target_include_directories called with non-compilable target type
Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/include_directories/export-NOWARN.cmake b/Tests/RunCMake/include_directories/export-NOWARN.cmake
index 307ce5a..50720a0 100644
--- a/Tests/RunCMake/include_directories/export-NOWARN.cmake
+++ b/Tests/RunCMake/include_directories/export-NOWARN.cmake
@@ -1,4 +1,4 @@
-
+enable_language(CXX)
add_library(foo empty.cpp)
set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<0:>/include/subdir)
set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_PREFIX>/include/subdir)
diff --git a/Tests/RunCMake/include_directories/incomplete-genex.cmake b/Tests/RunCMake/include_directories/incomplete-genex.cmake
index b6900a4..976695a 100644
--- a/Tests/RunCMake/include_directories/incomplete-genex.cmake
+++ b/Tests/RunCMake/include_directories/incomplete-genex.cmake
@@ -1,4 +1,4 @@
-project(incomplete-genex)
+enable_language(CXX)
cmake_policy(SET CMP0022 NEW)
cmake_policy(SET CMP0023 NEW)