diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 354f12341..5a3e7d104 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -183,6 +183,8 @@ set(SRCS cmFileTimeComparison.cxx cmFileTimeComparison.h cmGeneratedFileStream.cxx + cmGeneratorExpressionDAGChecker.cxx + cmGeneratorExpressionDAGChecker.h cmGeneratorExpressionEvaluator.cxx cmGeneratorExpressionEvaluator.h cmGeneratorExpressionLexer.cxx diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h index b11bff967..6a0cd9d2e 100644 --- a/Source/cmAddTestCommand.h +++ b/Source/cmAddTestCommand.h @@ -81,7 +81,7 @@ public: "\n" "Arguments after COMMAND may use \"generator expressions\" with the " "syntax \"$<...>\". " - CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS + CM_DOCUMENT_ADD_TEST_GENERATOR_EXPRESSIONS "Example usage:\n" " add_test(NAME mytest\n" " COMMAND testDriver --config $\n" diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h index 74c673a35..6b0cf4914 100644 --- a/Source/cmDocumentGeneratorExpressions.h +++ b/Source/cmDocumentGeneratorExpressions.h @@ -12,7 +12,7 @@ #ifndef cmDocumentGeneratorExpressions_h #define cmDocumentGeneratorExpressions_h -#define CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS \ +#define CM_DOCUMENT_ADD_TEST_GENERATOR_EXPRESSIONS \ "Generator expressions are evaluted during build system generation " \ "to produce information specific to each build configuration. " \ "Valid expressions are:\n" \ @@ -20,6 +20,12 @@ " $<1:...> = content of \"...\"\n" \ " $ = '1' if config is \"cfg\", else '0'\n" \ " $ = configuration name\n" \ + " $ = '1' if the '...' is true, else '0'\n" \ + " $ = '1' if a is STREQUAL b, else '0'\n" \ + " $ = A literal '>'. Used to compare " \ + "strings which contain a '>' for example.\n" \ + " $ = A literal ','. Used to compare " \ + "strings which contain a ',' for example.\n" \ " $ = main file (.exe, .so.1.2, .a)\n" \ " $ = file used to link (.a, .lib, .so)\n" \ " $ = file with soname (.so.3)\n" \ @@ -29,11 +35,20 @@ " $/$\n" \ " $/$\n" \ " $/$\n" \ + " $ = The value of the property prop\n" \ + "the target tgt. Note that tgt is not added as a dependency of the " \ + "target this expression is evaluated on.\n" \ "Boolean expressions:\n" \ " $ = '1' if all '?' are '1', else '0'\n" \ " $ = '0' if all '?' are '0', else '1'\n" \ " $ = '0' if '?' is '1', else '1'\n" \ "where '?' is always either '0' or '1'.\n" \ + +#define CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS \ + CM_DOCUMENT_ADD_TEST_GENERATOR_EXPRESSIONS \ + "Expressions with an implicit 'this' target:" \ + " $ = The value of the property prop on\n" \ + "the target on which the generator expression is evaluated.\n" \ "" #endif diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index b1bbd905d..8b2dabacf 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -617,14 +617,17 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, "