Skip to content

Commit 612cde0

Browse files
authored
Merge pull request eclipse-omr#7109 from keithc-ca/cmake
Avoid cmake policy CMP0140 warnings
2 parents 873ac5d + 5efa446 commit 612cde0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cmake/modules/ddr/GenerateStub.cmake

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ endmacro()
4747
file(WRITE "${output_file}" "/* generated file, DO NOT EDIT */\nconst char ddr_source[] = \"${input_file}\";\n")
4848

4949
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()
50+
51+
# Leave the output mostly empty if the input doesn't have any DDR directives.
52+
if(rc EQUAL 0)
5453
execute_process(COMMAND awk -f ${AWK_SCRIPT} ${input_file} OUTPUT_VARIABLE awk_result RESULT_VARIABLE rc)
5554

5655
if(NOT rc EQUAL 0)
@@ -67,5 +66,3 @@ else()
6766
file(APPEND ${output_file} "${awk_result}")
6867
endif()
6968
endif()
70-
71-
return(${rc})

0 commit comments

Comments
 (0)