Skip to content

Commit 13c9a17

Browse files
Merge pull request #5234 from hannes-steffenhagen-diffblue/fix/cmake-ansi-c-library-converter
Make CMake generation of cprover_library.inc match with Makefile
2 parents 0fbabca + 711b52e commit 13c9a17

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/ansi-c/CMakeLists.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@ generic_flex(ansi_c)
44
add_executable(converter library/converter.cpp)
55

66
file(GLOB ansi_c_library_sources "library/*.c")
7-
set(converter_input_path "${CMAKE_CURRENT_SOURCE_DIR}/converter_input.txt")
8-
file(WRITE ${converter_input_path} "")
9-
foreach(source ${ansi_c_library_sources})
10-
file(READ ${source} file_contents)
11-
file(APPEND ${converter_input_path} "${file_contents}")
12-
endforeach()
137

148
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc"
15-
COMMAND converter < ${converter_input_path} > "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc"
16-
DEPENDS converter ${converter_input_path}
17-
)
9+
COMMAND cat ${ansi_c_library_sources} | $<TARGET_FILE:converter> > "${CMAKE_CURRENT_BINARY_DIR}/cprover_library.inc"
10+
DEPENDS converter ${ansi_c_library_sources})
1811

1912
add_executable(file_converter file_converter.cpp)
2013

0 commit comments

Comments
 (0)