Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a01fc717
authored
9 years ago
by
Christian Kern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate cmake error on doxygen warning, when WARNINGS_ARE_ERRORS is enabled
parent
cd0ebac0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
CMakeCommon/CreateDoxygenDocumentationTarget.cmake
+24
-7
No files found.
CMakeCommon/CreateDoxygenDocumentationTarget.cmake
View file @
a01fc717
...
...
@@ -40,13 +40,30 @@ function (CreateDoxygenDocumentationTarget)
if
(
TARGET doxygen
)
# Do nothing, since the repeated adding causes an error
else
()
add_custom_target
(
doxygen
#ALL
COMMAND
${
DOXYGEN_EXECUTABLE
}
${
PROJECT_BINARY_DIR
}
/Doxyfile
SOURCES
${
PROJECT_BINARY_DIR
}
/Doxyfile
)
# IF you do NOT want the documentation to be generated EVERY time you build the project
# then leave out the 'ALL' keyword from the above command.
FILE
(
WRITE
${
CMAKE_BINARY_DIR
}
/doxygen_makefile.cmake
"
MESSAGE(STATUS
\"
Running Doxygen
\"
)
EXECUTE_PROCESS(
COMMAND
\$
{EXE}
\$
{IN}
ERROR_VARIABLE DOXYGEN_OUT_ERR
RESULT_VARIABLE DOXYGEN_OUT_RESULT)
STRING(LENGTH
\"\$
{DOXYGEN_OUT_ERR}
\"
LENGTH_ERR)
IF ( NOT
\$
{LENGTH_ERR} STREQUAL
\"
0
\"
)
MESSAGE (WARNING
\"
Doxygen produced following warnings and or/errors:
\$
{DOXYGEN_OUT_ERR}
\"
)
IF (
\$
{WARNINGS_ARE_ERRORS} STREQUAL ON OR NOT
\$
{DOXYGEN_OUT_RESULT} STREQUAL
\"
0
\"
)
MESSAGE (FATAL_ERROR
\"
Exiting doxygen generation due to errors (or warnings, if WARNINGS_ARE_ERRORS is enabled)
\"
)
ENDIF ()
ENDIF ()
"
)
add_custom_target
(
doxygen
)
add_custom_command
(
TARGET doxygen
COMMAND
${
CMAKE_COMMAND
}
-DEXE=
${
DOXYGEN_EXECUTABLE
}
-DIN=
${
PROJECT_BINARY_DIR
}
/Doxyfile
-DWARNINGS_ARE_ERRORS=
${
WARNINGS_ARE_ERRORS
}
-P
${
CMAKE_BINARY_DIR
}
/doxygen_makefile.cmake
)
endif
()
endif
()
endfunction
()
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment