Skip to content

Commit 0807a2f

Browse files
committed
Fix of possible target names collisions for sim2doc
* Fixed OpenFLUID CMake module * Updated build process of sim2doc in waresdev (closes #806)
1 parent 285e3e5 commit 0807a2f

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

cmake/OpenFLUIDHelpersConfig.cmake.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,15 @@ MACRO(OPENFLUID_ADD_SIMULATOR _SIMNAME)
410410
ARGS "buddy" "sim2doc" "--options=inputcpp=${${_SIMNAME}_SOURCE_DIR}/${_CPP_FOR_DOC},outputdir=${_DOCS_OUTPUT_PATH},pdf=1${_TPL_OPTION}"
411411
)
412412

413-
ADD_CUSTOM_TARGET(doc-pdf DEPENDS "${_DOCS_OUTPUT_PATH}/${${_SIMNAME}_ID}.pdf")
413+
ADD_CUSTOM_TARGET(${${_SIMNAME}_ID}-doc-pdf DEPENDS "${_DOCS_OUTPUT_PATH}/${${_SIMNAME}_ID}.pdf")
414414

415415
_OPENFLUID_WARE_TRANSLATIONS(${_SIMNAME})
416416

417417
_OPENFLUID_WARE_TESTS(${_SIMNAME} "-p")
418418

419419

420-
ADD_CUSTOM_TARGET(doc-pdf-install
421-
DEPENDS doc-pdf
420+
ADD_CUSTOM_TARGET(${${_SIMNAME}_ID}-doc-pdf-install
421+
DEPENDS ${${_SIMNAME}_ID}-doc-pdf
422422
COMMAND "${CMAKE_COMMAND}" "-E" "copy"
423423
"${_DOCS_OUTPUT_PATH}/${${_SIMNAME}_ID}.pdf" "${_OPNFLD_INSTALL_PATH}/${${_SIMNAME}_ID}.pdf")
424424

src/openfluid/waresdev/WareSrcContainer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,9 @@ unsigned int WareSrcContainer::getBuildJobs() const
502502

503503
QString WareSrcContainer::getGenerateDocTarget() const
504504
{
505-
// build target is "doc-pdf-install" if current build mode is BUILD_WITHINSTALL, "doc-pdf" in other cases
506-
return (m_BuildMode == BuildMode::BUILD_WITHINSTALL ? "doc-pdf-install" : "doc-pdf");
505+
// build target is "$ID-doc-pdf-install" if current build mode is BUILD_WITHINSTALL, "$ID-doc-pdf" in other cases
506+
// wher $ID is the ware ID
507+
return QString("%1-%2").arg(m_ID).arg((m_BuildMode == BuildMode::BUILD_WITHINSTALL ? "doc-pdf-install" : "doc-pdf"));
507508
}
508509

509510

0 commit comments

Comments
 (0)