# RootMacros.cmake should also support target features for dictionary

**URL:** <https://root-forum.cern.ch/t/rootmacros-cmake-should-also-support-target-features-for-dictionary/42159>\
**Category:** Evolution Proposals, Apps & Ideas\
**Created:** [November 7, 2020, 7:11pm UTC](https://root-forum.cern.ch/t/rootmacros-cmake-should-also-support-target-features-for-dictionary/42159 "2020-11-07T19:11:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlalik](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rlalik/32/25117_2.png) [@rlalik](https://root-forum.cern.ch/u/rlalik)\
**Post date:** [November 7, 2020, 7:11pm UTC](https://root-forum.cern.ch/t/rootmacros-cmake-should-also-support-target-features-for-dictionary/42159/1 "2020-11-07T19:11:52Z")

</div>

Just add these two lines e.g. at line 667 of RootMacros.cmake to also reuse targets compile features when compiling the dictionary.

```auto
    target_compile_features(${dictionary} PRIVATE
        $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_FEATURES>)

```

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [November 9, 2020, 9:25am UTC](https://root-forum.cern.ch/t/rootmacros-cmake-should-also-support-target-features-for-dictionary/42159/2 "2020-11-09T09:25:42Z")

</div>

Hi @rlalik,  
could you please open a GitHub issue at [https://github.com/root-project/root/issues](https://github.com/root-project/root/issues) with the above improvement suggestion?

I will ping the relevant people to take a look.

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![rlalik](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rlalik/32/25117_2.png) [@rlalik](https://root-forum.cern.ch/u/rlalik)\
**Post date:** [January 3, 2021, 3:37pm UTC](https://root-forum.cern.ch/t/rootmacros-cmake-should-also-support-target-features-for-dictionary/42159/3 "2021-01-03T15:37:00Z")

</div>

Can this bugfix be implement in the next release? Was reported with 6.22.02 and still exists in releases 6.22.04 and 6.22.06 and causes problems.

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [January 4, 2021, 11:22am UTC](https://root-forum.cern.ch/t/rootmacros-cmake-should-also-support-target-features-for-dictionary/42159/4 "2021-01-04T11:22:15Z")

</div>

Hi,  
sorry for the high latency, this needs follow-up on our build system experts in the relevant GitHub issue: [https://github.com/root-project/root/issues/6777](https://github.com/root-project/root/issues/6777) , let’s continue the discussion there.

---

<div class="post-metadata">

**Author:** ![RENATO\_QUAGLIANI](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/renato_quagliani/32/19496_2.png) [@RENATO\_QUAGLIANI](https://root-forum.cern.ch/u/RENATO_QUAGLIANI)\
**Post date:** [January 4, 2021, 6:29pm UTC](https://root-forum.cern.ch/t/rootmacros-cmake-should-also-support-target-features-for-dictionary/42159/5 "2021-01-04T18:29:55Z")

</div>

Hi, sorry to jump in, might be this issue linked to the problems i faced importing the custom libraries into a pyROOT session since ROOT v\>6.20 ?  
I had to hack some stuff, and among all the RPATH settings was a global configuration i had on my CMake setup

> [@CMake project with custom libraries and python bindings](https://root-forum.cern.ch/t/cmake-project-with-custom-libraries-and-python-bindings/42819/14):
>
> Hi @vvassilev, at the end i did several test, which possibly link to some LinkDef issue and header files i am using. I have not managed to get the NO\_CXXMODULE configuration working and also the extra flags -cxxmodule-writeEmptyPCMFiles was not working I ended up having something working fine proceeding as in the zip file for my reduced CMake project creating libraries and used inside python . [for\_root\_forum.zip](https://root-forum.cern.ch/uploads/short-url/g4SuhmZlgejE2hiNmrqhkCZ5O17.zip) (369.9 KB) for each library i have i added #include in the LinkDef.h files for al…
