Closed NivethaSukumar closed 1 year ago
Is there a project.yml
in CMAKE_CURRENT_SOURCE_DIR
? It seems like you might be travelling multiple source dirs in this? Which has the project.yml file?
Yes, I have fixed it and it seems to be working fine with the project.yml
file.
# Generate a command to create each mock.
foreach(header ${HEADERS_TO_MOCK})
get_filename_component(base ${header} NAME_WE)
set(mock ${MOCK_DIR}/mock_${base}.c)
add_custom_command(OUTPUT ${mock}
COMMAND ruby ${cmock_SOURCE_DIR}/lib/cmock.rb -o${CMAKE_CURRENT_SOURCE_DIR}/project.yml --mock_path=${MOCK_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${header}
DEPENDS ${header}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating mock for ${base}"
)
list(APPEND MOCKS ${mock})
endforeach()
Thanks!
Glad to hear it! Best of luck!
CMakeLists.txt
project.yml file is
I do not get any error however some of the mock functions are not generated using plugins described.