We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 873ac5d + 5efa446 commit 612cde0Copy full SHA for 612cde0
cmake/modules/ddr/GenerateStub.cmake
@@ -47,10 +47,9 @@ endmacro()
47
file(WRITE "${output_file}" "/* generated file, DO NOT EDIT */\nconst char ddr_source[] = \"${input_file}\";\n")
48
49
execute_process(COMMAND grep -E -q "@ddr_(namespace|options):" ${input_file} RESULT_VARIABLE rc)
50
-if(NOT rc EQUAL 0)
51
- # input doesn't have any DDR directives, so leave the file (mostly) empty
52
- set(rc 0)
53
-else()
+
+# Leave the output mostly empty if the input doesn't have any DDR directives.
+if(rc EQUAL 0)
54
execute_process(COMMAND awk -f ${AWK_SCRIPT} ${input_file} OUTPUT_VARIABLE awk_result RESULT_VARIABLE rc)
55
56
if(NOT rc EQUAL 0)
@@ -67,5 +66,3 @@ else()
67
66
file(APPEND ${output_file} "${awk_result}")
68
endif()
69
70
-
71
-return(${rc})
0 commit comments