summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-01-14 23:58:28 -0500
committerRobert Maynard <rmaynard@nvidia.com>2023-04-12 10:43:48 -0400
commit0fb923c46041d67110c8e0907afdf66b3b25f25a (patch)
tree471126bf0dcb9ef4481716d38524b57a01ca2973 /Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt
parent6c11f7e4a8805189835c04a398864f96081b3183 (diff)
downloadcmake-0fb923c46041d67110c8e0907afdf66b3b25f25a.tar.gz
cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex
This generator expression is the inverse of `LINK_ONLY` and only coveys usage requirements for the purposes of compilation. Its intended use is to avoid needing to export targets that do not have link usage requirements (e.g., header-only libraries) when used by another target. It will also be used to represent private usage requirements on exported C++ module-containing targets in the future. Eventually there should be logic to collapse nesting of `$<COMPILE_ONLY>` and `$<LINK_ONLY>` when generating instances of either. A TODO is left in the code for this case. See: #15415
Diffstat (limited to 'Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt')
-rw-r--r--Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt
new file mode 100644
index 0000000000..5e7fce2a1b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at COMPILE_ONLY-not-compiling.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_ONLY:something>
+
+ \$<COMPILE_ONLY:...> may only be used via linking
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)