diff options
34 files changed, 94 insertions, 43 deletions
diff --git a/Modules/Compiler/Clang-FindBinUtils.cmake b/Modules/Compiler/Clang-FindBinUtils.cmake index c81e77a..e2822a1 100644 --- a/Modules/Compiler/Clang-FindBinUtils.cmake +++ b/Modules/Compiler/Clang-FindBinUtils.cmake @@ -16,6 +16,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES HINTS ${__clang_hints} DOC "LLVM archiver" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR) # http://manpages.ubuntu.com/manpages/precise/en/man1/llvm-ranlib.1.html find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES @@ -23,3 +24,4 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES HINTS ${__clang_hints} DOC "Generate index for LLVM archive" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB) diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake index 142636c..16b7bbd 100644 --- a/Modules/Compiler/GNU-FindBinUtils.cmake +++ b/Modules/Compiler/GNU-FindBinUtils.cmake @@ -22,6 +22,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES HINTS ${__gcc_hints} DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR) # http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES @@ -31,3 +32,4 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES HINTS ${__gcc_hints} DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB) diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 7f1ff57..5dc55d4 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING) # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}") macro( cuda_find_host_program ) - find_host_program( ${ARGN} ) + if (COMMAND find_host_program) + find_host_program( ${ARGN} ) + else() + find_program( ${ARGN} ) + endif() endmacro() else() # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 0090cdc..4e52cb3 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -609,7 +609,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var) if(NOT is_embedded) if(NOT IS_ABSOLUTE "${resolved_file}") - if(lower MATCHES "^msvc[^/]+dll" AND is_system) + if(lower MATCHES "^(msvc|api-ms-win-)[^/]+dll" AND is_system) message(STATUS "info: non-absolute msvc file '${file}' returning type '${type}'") else() message(STATUS "warning: gp_resolved_file_type non-absolute file '${file}' returning type '${type}' -- possibly incorrect") diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8d4eeb6..b441e9a 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 9) -set(CMake_VERSION_PATCH 20170626) +set(CMake_VERSION_PATCH 20170627) #set(CMake_VERSION_RC 1) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 2a93966..4a0cab3 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4191,6 +4191,23 @@ bool cmMakefile::CompileFeatureKnown(cmTarget const* target, const char* cmMakefile::CompileFeaturesAvailable(const std::string& lang, std::string* error) const { + if (!this->GlobalGenerator->GetLanguageEnabled(lang)) { + std::ostringstream e; + if (error) { + e << "cannot"; + } else { + e << "Cannot"; + } + e << " use features from non-enabled language " << lang; + if (error) { + *error = e.str(); + } else { + this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, e.str(), + this->Backtrace); + } + return CM_NULLPTR; + } + const char* featuresKnown = this->GetDefinition("CMAKE_" + lang + "_COMPILE_FEATURES"); @@ -4202,9 +4219,9 @@ const char* cmMakefile::CompileFeaturesAvailable(const std::string& lang, e << "No"; } e << " known features for " << lang << " compiler\n\"" - << this->GetDefinition("CMAKE_" + lang + "_COMPILER_ID") + << this->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_ID") << "\"\nversion " - << this->GetDefinition("CMAKE_" + lang + "_COMPILER_VERSION") << "."; + << this->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_VERSION") << "."; if (error) { *error = e.str(); } else { diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d932245..4bd0cd8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -146,7 +146,7 @@ void cmVisualStudio10TargetGenerator::WritePlatformConfigTag( (*stream) << config << "|" << this->Platform; (*stream) << "'"; // handle special case for 32 bit C# targets - if (csproj == this->ProjectType && this->Platform == "Win32") { + if (this->ProjectType == csproj && this->Platform == "Win32") { (*stream) << " Or "; (*stream) << "'$(Configuration)|$(Platform)'=='"; (*stream) << config << "|x86"; @@ -294,7 +294,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("</PropertyGroup>\n", 1); } - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteProjectConfigurations(); } this->WriteString("<PropertyGroup Label=\"Globals\">\n", 1); @@ -311,7 +311,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->GeneratorTarget->GetProperty("VS_GLOBAL_PROJECT_TYPES"); if (vsProjectTypes) { std::string tagName = "ProjectTypes"; - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { tagName = "ProjectTypeGuids"; } this->WriteString("", 2); @@ -465,7 +465,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteProjectConfigurationValues(); - if (vcxproj == this->ProjectType) { + if (this->ProjectType == vcxproj) { this->WriteString("<Import Project=\"" VS10_CXX_PROPS "\" />\n", 1); } this->WriteString("<ImportGroup Label=\"ExtensionSettings\">\n", 1); @@ -568,7 +568,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString(import.c_str(), 2); } this->WriteString("</ImportGroup>\n", 1); - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { for (std::vector<std::string>::const_iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { @@ -707,7 +707,7 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup() this->WriteString("<EmbeddedResource Include=\"", 2); this->ConvertToWindowsSlash(obj); bool useRelativePath = false; - if (csproj == this->ProjectType && this->InSourceBuild) { + if (this->ProjectType == csproj && this->InSourceBuild) { // If we do an in-source build and the resource file is in a // subdirectory // of the .csproj file, we have to use relative pathnames, otherwise @@ -720,7 +720,7 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup() } (*this->BuildFileStream) << obj << "\">\n"; - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteString("<DependentUpon>", 3); std::string hFileName = obj.substr(0, obj.find_last_of(".")) + ".h"; (*this->BuildFileStream) << hFileName << "</DependentUpon>\n"; @@ -830,7 +830,7 @@ void cmVisualStudio10TargetGenerator::WriteXamlFilesGroup() } this->WriteSource(xamlType, *oi, ">\n"); - if (csproj == this->ProjectType && !this->InSourceBuild) { + if (this->ProjectType == csproj && !this->InSourceBuild) { // add <Link> tag to written XAML source if necessary const std::string srcDir = this->Makefile->GetCurrentSourceDirectory(); const std::string binDir = this->Makefile->GetCurrentBinaryDirectory(); @@ -949,7 +949,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() this->WritePlatformConfigTag("PropertyGroup", i->c_str(), 1, " Label=\"Configuration\"", "\n"); - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { std::string configType = "<ConfigurationType>"; if (const char* vsConfigurationType = this->GeneratorTarget->GetProperty("VS_CONFIGURATION_TYPE")) { @@ -1275,7 +1275,7 @@ void cmVisualStudio10TargetGenerator::ConvertToWindowsSlash(std::string& s) } void cmVisualStudio10TargetGenerator::WriteGroups() { - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } @@ -1517,7 +1517,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) std::string copyToOutDir; std::string includeInVsix; std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { // EVERY extra source file must have a <Link>, otherwise it might not // be visible in Visual Studio at all. The path relative to current // source- or binary-dir is used within the link, if the file is @@ -2039,7 +2039,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( std::string xamlFileName = fileName.substr(0, fileName.find_last_of(".")); (*this->BuildFileStream) << xamlFileName << "</DependentUpon>\n"; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { std::string f = source->GetFullPath(); typedef std::map<std::string, std::string> CsPropMap; CsPropMap sourceFileTags; @@ -2085,7 +2085,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() if (ttype > cmStateEnums::GLOBAL_TARGET) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } @@ -2162,7 +2162,7 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental( if (!this->MSTools) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } // static libraries and things greater than modules do not need @@ -2291,7 +2291,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( std::string defineFlags = this->GeneratorTarget->Target->GetMakefile()->GetDefineFlags(); if (this->MSTools) { - if (vcxproj == this->ProjectType) { + if (this->ProjectType == vcxproj) { clOptions.FixExceptionHandlingDefault(); clOptions.AddFlag("PrecompiledHeader", "NotUsing"); std::string asmLocation = configName + "/"; @@ -2348,7 +2348,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( } } - if (csproj != this->ProjectType && clOptions.IsManaged()) { + if (this->ProjectType != csproj && clOptions.IsManaged()) { this->Managed = true; std::string managedType = clOptions.GetFlag("CompileAsManaged"); if (managedType == "Safe") { @@ -2356,7 +2356,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.AddFlag("CallingConvention", ""); } } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { // /nowin32manifest overrides /win32manifest: parameter if (clOptions.HasFlag("NoWin32Manifest")) { clOptions.RemoveFlag("ApplicationManifest"); @@ -2550,7 +2550,7 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( cudaOptions.RemoveFlag("AdditionalCompilerOptions"); if (!aco.empty()) { aco = this->LocalGenerator->EscapeForShell(aco, false); - cudaOptions.AppendFlag("AdditionalOptions", "-Xcompiler=" + aco); + cudaOptions.AppendFlagString("AdditionalOptions", "-Xcompiler=" + aco); } } @@ -2639,8 +2639,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions( // Suppress deprecation warnings for default GPU targets during device link. if (cmSystemTools::VersionCompareGreaterEq( this->GlobalGenerator->GetPlatformToolsetCudaString(), "8.0")) { - cudaLinkOptions.AppendFlag("AdditionalOptions", - "-Wno-deprecated-gpu-targets"); + cudaLinkOptions.AppendFlagString("AdditionalOptions", + "-Wno-deprecated-gpu-targets"); } this->CudaLinkOptions[configName] = pOptions.release(); @@ -3280,7 +3280,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions( this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } Options& linkOptions = *(this->LinkOptions[config]); @@ -3350,7 +3350,7 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions( if (!this->MSTools) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } @@ -3392,6 +3392,9 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions( void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() { + if (this->ProjectType == csproj) { + return; + } for (std::vector<std::string>::const_iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { @@ -3416,7 +3419,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() // output midl flags <Midl></Midl> this->WriteMidlOptions(*i, includes); // write events - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteEvents(*i); } // output link flags <Link></Link> @@ -3482,7 +3485,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent( script += cmVS10EscapeXML(lg->ConstructScript(ccg)); } comment = cmVS10EscapeComment(comment); - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteString("<Message>", 3); (*this->BuildFileStream) << cmVS10EscapeXML(comment) << "</Message>\n"; this->WriteString("<Command>", 3); @@ -3492,7 +3495,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent( } } (*this->BuildFileStream) << script; - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { (*this->BuildFileStream) << "</Command>"; } (*this->BuildFileStream) << "\n"; @@ -4332,7 +4335,7 @@ bool cmVisualStudio10TargetGenerator::ForceOld(const std::string& source) const void cmVisualStudio10TargetGenerator::GetCSharpSourceProperties( cmSourceFile const* sf, std::map<std::string, std::string>& tags) { - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { const cmPropertyMap& props = sf->GetProperties(); for (cmPropertyMap::const_iterator p = props.begin(); p != props.end(); ++p) { diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt index b946e3f..7ef626f 100644 --- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt +++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt @@ -16,6 +16,11 @@ set(CMAKE_CUDA_STANDARD 11) add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu) if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC") + # Test adding a flag that is not in our CUDA flag table for VS. + if(NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 8) + string(APPEND CMAKE_CUDA_FLAGS " --ftemplate-depth 50") + endif() + # Test adding a flag that nvcc should pass to the host compiler. target_compile_options(CUDASeparateLibA PRIVATE -Xcompiler=-bigobj) endif() diff --git a/Tests/RunCMake/target_compile_features/CMakeLists.txt b/Tests/RunCMake/target_compile_features/CMakeLists.txt index 3482e6b..2897109 100644 --- a/Tests/RunCMake/target_compile_features/CMakeLists.txt +++ b/Tests/RunCMake/target_compile_features/CMakeLists.txt @@ -1,3 +1,3 @@ cmake_minimum_required(VERSION 3.0) -project(${RunCMake_TEST} CXX) +project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake index 33faf2b..1f67f11 100644 --- a/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake @@ -11,3 +11,4 @@ run_cmake(not_a_cxx_feature) run_cmake(no_matching_cxx_feature) run_cmake(not_a_c_feature) run_cmake(no_matching_c_feature) +run_cmake(cxx_not_enabled) diff --git a/Tests/RunCMake/target_compile_features/alias_target-stderr.txt b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt index 417bf62..5ebe170 100644 --- a/Tests/RunCMake/target_compile_features/alias_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at alias_target.cmake:4 \(target_compile_features\): +CMake Error at alias_target.cmake:[0-9]+ \(target_compile_features\): target_compile_features can not be used on an ALIAS target. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/alias_target.cmake b/Tests/RunCMake/target_compile_features/alias_target.cmake index d35ddba..6fcdada 100644 --- a/Tests/RunCMake/target_compile_features/alias_target.cmake +++ b/Tests/RunCMake/target_compile_features/alias_target.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) add_executable(main empty.cpp) add_executable(Alias::Main ALIAS main) diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled-result.txt b/Tests/RunCMake/target_compile_features/cxx_not_enabled-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt new file mode 100644 index 0000000..4f707c7 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at cxx_not_enabled.cmake:[0-9]+ \(target_compile_features\): + target_compile_features cannot use features from non-enabled language CXX +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake b/Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake new file mode 100644 index 0000000..b7e9119 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake @@ -0,0 +1,2 @@ +add_executable(main empty.c) +target_compile_features(main PRIVATE cxx_decltype) diff --git a/Tests/RunCMake/target_compile_features/imported_target-stderr.txt b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt index c6ff5ec..7a07427 100644 --- a/Tests/RunCMake/target_compile_features/imported_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at imported_target.cmake:3 \(target_compile_features\): +CMake Error at imported_target.cmake:[0-9]+ \(target_compile_features\): Cannot specify compile features for imported target "main". Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/imported_target.cmake b/Tests/RunCMake/target_compile_features/imported_target.cmake index e248c2f..e886ce9 100644 --- a/Tests/RunCMake/target_compile_features/imported_target.cmake +++ b/Tests/RunCMake/target_compile_features/imported_target.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) add_library(main INTERFACE IMPORTED) target_compile_features(main INTERFACE cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt index bd5b7b9..9917be7 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt +++ b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at invalid_args.cmake:3 \(target_compile_features\): +CMake Error at invalid_args.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with invalid arguments Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/invalid_args.cmake b/Tests/RunCMake/target_compile_features/invalid_args.cmake index 1a7fb37..cc051a4 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args.cmake +++ b/Tests/RunCMake/target_compile_features/invalid_args.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) add_executable(main empty.cpp) target_compile_features(main INVALID cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt index c30209a..3708998 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt +++ b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at invalid_args_on_interface.cmake:3 \(target_compile_features\): +CMake Error at invalid_args_on_interface.cmake:[0-9]+ \(target_compile_features\): target_compile_features may only be set INTERFACE properties on INTERFACE targets Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/target_compile_features/invalid_args_on_interface.cmake b/Tests/RunCMake/target_compile_features/invalid_args_on_interface.cmake index 324d0f3..49d2d82 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args_on_interface.cmake +++ b/Tests/RunCMake/target_compile_features/invalid_args_on_interface.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) add_library(main INTERFACE) target_compile_features(main PRIVATE cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt b/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt index 96b959c..1875d12 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at no_matching_c_feature.cmake:[0-9][0-9]? \((target_compile_features|message)\): +CMake Error at no_matching_c_feature.cmake:[0-9]+ \((target_compile_features|message)\): The compiler feature "gnu_c_dummy" is not known to C compiler "GNU" diff --git a/Tests/RunCMake/target_compile_features/no_matching_c_feature.cmake b/Tests/RunCMake/target_compile_features/no_matching_c_feature.cmake index a44caf2..0e93b41 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_c_feature.cmake +++ b/Tests/RunCMake/target_compile_features/no_matching_c_feature.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) if (NOT ";${CMAKE_C_COMPILE_FEATURES};" MATCHES ";gnu_c_typeof;") # Simulate passing the test. diff --git a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt index f976dfe..90d41c9 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at no_matching_cxx_feature.cmake:[0-9][0-9]? \((target_compile_features|message)\): +CMake Error at no_matching_cxx_feature.cmake:[0-9]+ \((target_compile_features|message)\): The compiler feature "[^"]+" is not known to CXX compiler "[^"]*" diff --git a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature.cmake b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature.cmake index ab1fd76..4ee3445 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature.cmake +++ b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) if (NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";gnu_cxx_typeof;" AND NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";msvc_cxx_sealed;" ) diff --git a/Tests/RunCMake/target_compile_features/no_target-stderr.txt b/Tests/RunCMake/target_compile_features/no_target-stderr.txt index 323ba7a..65974b4 100644 --- a/Tests/RunCMake/target_compile_features/no_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_target-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at no_target.cmake:2 \(target_compile_features\): +CMake Error at no_target.cmake:[0-9]+ \(target_compile_features\): Cannot specify compile features for target "main" which is not built by this project. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/target_compile_features/no_target.cmake b/Tests/RunCMake/target_compile_features/no_target.cmake index 3f0afe2..a514de8 100644 --- a/Tests/RunCMake/target_compile_features/no_target.cmake +++ b/Tests/RunCMake/target_compile_features/no_target.cmake @@ -1,2 +1,3 @@ +enable_language(CXX) target_compile_features(main INTERFACE cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt b/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt index 6dd00f3..493c582 100644 --- a/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at not_a_c_feature.cmake:3 \(target_compile_features\): +CMake Error at not_a_c_feature.cmake:[0-9]+ \(target_compile_features\): target_compile_features specified unknown feature "c_not_a_feature" for target "main". Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/target_compile_features/not_a_c_feature.cmake b/Tests/RunCMake/target_compile_features/not_a_c_feature.cmake index 0420698..f5d70d0 100644 --- a/Tests/RunCMake/target_compile_features/not_a_c_feature.cmake +++ b/Tests/RunCMake/target_compile_features/not_a_c_feature.cmake @@ -1,3 +1,4 @@ +enable_language(C) add_executable(main empty.c) target_compile_features(main diff --git a/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt index efa2bad..3dbf0e6 100644 --- a/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at not_a_cxx_feature.cmake:3 \(target_compile_features\): +CMake Error at not_a_cxx_feature.cmake:[0-9]+ \(target_compile_features\): target_compile_features specified unknown feature "cxx_not_a_feature" for target "main". Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/target_compile_features/not_a_cxx_feature.cmake b/Tests/RunCMake/target_compile_features/not_a_cxx_feature.cmake index 0207b72..bc3a8c4 100644 --- a/Tests/RunCMake/target_compile_features/not_a_cxx_feature.cmake +++ b/Tests/RunCMake/target_compile_features/not_a_cxx_feature.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) add_executable(main empty.cpp) target_compile_features(main diff --git a/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt index 2f8d812..c0c2efa 100644 --- a/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at not_enough_args.cmake:3 \(target_compile_features\): +CMake Error at not_enough_args.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with incorrect number of arguments Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_enough_args.cmake b/Tests/RunCMake/target_compile_features/not_enough_args.cmake index 9561230..f5b7198 100644 --- a/Tests/RunCMake/target_compile_features/not_enough_args.cmake +++ b/Tests/RunCMake/target_compile_features/not_enough_args.cmake @@ -1,3 +1,4 @@ +enable_language(CXX) add_executable(main empty.cpp) target_compile_features(main) diff --git a/Tests/RunCMake/target_compile_features/utility_target-stderr.txt b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt index d239059..ff03310 100644 --- a/Tests/RunCMake/target_compile_features/utility_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at utility_target.cmake:4 \(target_compile_features\): +CMake Error at utility_target.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with non-compilable target type Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) |