Skip to content

Commit

Permalink
fix, yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Jan 27, 2025
1 parent bba712a commit 39e82d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 5 additions & 3 deletions cmake/mrc-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,16 @@ function(mrc_target_resources _target)
# If we can use DEPFILE, use it.
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.21")
add_custom_target(
OUTPUT ${RSRC_DEP_FILE}
COMMAND ${MRC_EXECUTABLE} -d ${RSRC_DEP_FILE}
"generate_${_target}_depends_file"
BYPRODUCTS ${RSRC_DEP_FILE}
COMMENT "Generating depends file for ${_target} resources"
COMMAND ${MRC_EXECUTABLE} -d ${RSRC_DEP_FILE} -o ${RSRC_FILE}
${MRC_OPTION_RESOURCES}
VERBATIM)

add_custom_command(OUTPUT ${RSRC_FILE}
DEPFILE ${RSRC_DEP_FILE}
DEPENDS ${RSRC_DEP_FILE}
DEPENDS "generate_${_target}_depends_file"
COMMAND ${MRC_EXECUTABLE} -o ${RSRC_FILE} ${OPTIONS}
${MRC_OPTION_RESOURCES}
VERBATIM)
Expand Down
6 changes: 1 addition & 5 deletions src/mrc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,7 @@ int main(int argc, char *argv[])
exit(0);
}

if (config.has("help") or config.operands().empty() or
not (config.has("output") or config.has("depends")))
if (config.has("help") or config.operands().empty() or not config.has("output"))
{
std::cout << config << std::endl;
exit(config.has("help") ? 0 : 1);
Expand Down Expand Up @@ -1202,9 +1201,6 @@ int main(int argc, char *argv[])
exit(0);
}

if (not config.has("output"))
return 0;

// --------------------------------------------------------------------
// find out the required ELF format.

Expand Down

0 comments on commit 39e82d5

Please sign in to comment.