summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmTargetPropCommandBase.cxx5
-rw-r--r--Tests/RunCMake/interface_library/target_commands-stderr.txt16
-rw-r--r--Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt2
3 files changed, 11 insertions, 12 deletions
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index 45fe430..9f69dea 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -17,11 +17,11 @@ bool cmTargetPropCommandBase::HandleArguments(
return false;
}
- // Lookup the target for which libraries are specified.
if (this->Makefile->IsAlias(args[0])) {
this->SetError("can not be used on an ALIAS target.");
return false;
}
+ // Lookup the target for which property-values are specified.
this->Target =
this->Makefile->GetCMakeInstance()->GetGlobalGenerator()->FindTarget(
args[0]);
@@ -92,8 +92,7 @@ bool cmTargetPropCommandBase::ProcessContentArgs(
if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY &&
scope != "INTERFACE") {
- this->SetError("may only be set INTERFACE properties on INTERFACE "
- "targets");
+ this->SetError("may only set INTERFACE properties on INTERFACE targets");
return false;
}
diff --git a/Tests/RunCMake/interface_library/target_commands-stderr.txt b/Tests/RunCMake/interface_library/target_commands-stderr.txt
index be11b77..9362a75 100644
--- a/Tests/RunCMake/interface_library/target_commands-stderr.txt
+++ b/Tests/RunCMake/interface_library/target_commands-stderr.txt
@@ -23,25 +23,25 @@ Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
CMake Error at target_commands.cmake:9 \(target_include_directories\):
- target_include_directories may only be set INTERFACE properties on
- INTERFACE targets
+ target_include_directories may only set INTERFACE properties on INTERFACE
+ targets
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
CMake Error at target_commands.cmake:10 \(target_include_directories\):
- target_include_directories may only be set INTERFACE properties on
- INTERFACE targets
+ target_include_directories may only set INTERFACE properties on INTERFACE
+ targets
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
CMake Error at target_commands.cmake:12 \(target_compile_definitions\):
- target_compile_definitions may only be set INTERFACE properties on
- INTERFACE targets
+ target_compile_definitions may only set INTERFACE properties on INTERFACE
+ targets
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
CMake Error at target_commands.cmake:13 \(target_compile_definitions\):
- target_compile_definitions may only be set INTERFACE properties on
- INTERFACE targets
+ target_compile_definitions may only set INTERFACE properties on INTERFACE
+ targets
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
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 3708998..23a8eeb 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,5 +1,5 @@
CMake Error at invalid_args_on_interface.cmake:[0-9]+ \(target_compile_features\):
- target_compile_features may only be set INTERFACE properties on INTERFACE
+ target_compile_features may only set INTERFACE properties on INTERFACE
targets
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)