Hi, I am trying to utilize dyninst as a submodule and I've found that the handling of installing the 3rd-party libraries is a bit of a nightmare.
Here is my preliminary list of changes:
- generally replace all
add_definitions, include_directories, etc. with modern CMake target-based alternatives, e.g. target_compile_definitions, target_include_directories, etc. which have the capability to propagate those directives to other cmake targets which "link" to them.
- Replace
ExternalProject_Add with add_subdirectory when the subdirectory is a cmake project
- Create explicit
Dyninst_BUILD_<TPL> options to explicitly control whether to build the third-party library or do find_package(<TPL> REQUIRED)
- this has the benefit of allowing for failure if the package was not found but users do not want to build the TPL
- Fix DyninstConfig.cmake to make a proper interface target
- Fix target installation to namespace the dyninst targets, e.g.
symtabAPI -> Dyninst::symtabAPI
- In the third-party library handling, utilize
BUILD_INTERFACE and INSTALL_INTERFACE generator expressions to fix the broken support for Ninja as a generator
Here are my questions:
- Are y'all open to accepting a PR of this nature?
- I'm going to do this anyway because it is completely unreliable but I just want to know if it will be accepted upstream
- Is there any reason why y'all truly need cmake support back to v3.4.0, I consider v3.13 to be the minimal ideal minimum since it includes the
target_link_options support
Hi, I am trying to utilize dyninst as a submodule and I've found that the handling of installing the 3rd-party libraries is a bit of a nightmare.
Here is my preliminary list of changes:
add_definitions,include_directories, etc. with modern CMake target-based alternatives, e.g.target_compile_definitions,target_include_directories, etc. which have the capability to propagate those directives to other cmake targets which "link" to them.ExternalProject_Addwithadd_subdirectorywhen the subdirectory is a cmake projectDyninst_BUILD_<TPL>options to explicitly control whether to build the third-party library or dofind_package(<TPL> REQUIRED)symtabAPI->Dyninst::symtabAPIBUILD_INTERFACEandINSTALL_INTERFACEgenerator expressions to fix the broken support for Ninja as a generatorHere are my questions:
target_link_optionssupport