Skip to content

Commit

Permalink
issue #10015 Add warning when file set for USE_MDFILE_AS_MAINPAGE isn…
Browse files Browse the repository at this point in the history
…'t found

Add check on existing and specified mainpage
  • Loading branch information
albert-github committed May 1, 2023
1 parent bc42dee commit 76050ed
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11692,6 +11692,27 @@ void searchInputFiles()
}


static void checkMarkdownMainfile()
{
if (Config_getBool(MARKDOWN_SUPPORT))
{
QCString mdfileAsMainPage = Config_getString(USE_MDFILE_AS_MAINPAGE);
if (mdfileAsMainPage.isEmpty()) return;
FileInfo fi(mdfileAsMainPage.data());
if (!fi.exists())
{
warn_uncond("Specified markdown mainpage '%s' does not exist",qPrint(mdfileAsMainPage));
return;
}
bool ambig = false;
if (findFileDef(Doxygen::inputNameLinkedMap,mdfileAsMainPage,ambig)==0)
{
warn_uncond("Specified markdown mainpage '%s' has not been defined as input file",qPrint(mdfileAsMainPage));
return;
}
}
}

void parseInput()
{
AUTO_TRACE();
Expand Down Expand Up @@ -11898,6 +11919,8 @@ void parseInput()

searchInputFiles();

checkMarkdownMainfile();

// Notice: the order of the function calls below is very important!

if (Config_getBool(GENERATE_HTML) && !Config_getBool(USE_MATHJAX))
Expand Down

0 comments on commit 76050ed

Please sign in to comment.