How do I config ylt with fetch content? (Solved) #590
-
Search before asking
What happened + What you expected to happenHi, I am using ylt in a project. And the way I import ylt is by fetch content.
I found severl config flag interesting https://github.com/alibaba/yalantinglibs/blob/main/cmake/config.cmake How do I enable these flag options in my build with the way fetch content work? Do these flags taken effect simply by truning them to ON, and leave everything else to CMAKE? Then I should probably make a cl to my fork repo that turn these flag on Reproduction wayAnything elseAre you willing to submit a PR?
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
Can you look at this PR: #519 maybe helpful for you. |
Beta Was this translation helpful? Give feedback.
-
It seems config.cmake is only included when compiling yalantinlibs as the promary project, the config.cmake is never toched on fetch content, only install.cmake is executed Line 17 in a920fce It does hinder users's ability to config yanlantinlibs out of the box, but since fectch content allow pulling from git forks, it is ok, we just need to modify config into our need. |
Beta Was this translation helpful? Give feedback.
-
Ok, here is my solution, one solution is to modify yanlantinlibs in my local repo and commit config.cmake into Cmakelists.txt and change options in what I want them to be. Another way to work around is figure out all compilation flags and add them manully.
If you wan to use |
Beta Was this translation helpful? Give feedback.
-
I will leave this issue open, may be consider adding more config cmake options for devs who use fetch content for easier configuration? |
Beta Was this translation helpful? Give feedback.
-
Maybe we can export config.cmake to user. but some options' name should be changed to avoid conflict with user defined option. And I'll add some description to document later. |
Beta Was this translation helpful? Give feedback.
-
@yhyu13 hi, I test fetch content on my MacOS 13, it work fine the highlight cmake config maybe
the following is detail information about my demo
|
Beta Was this translation helpful? Give feedback.
@yhyu13 hi, I test fetch content on my MacOS 13, it work fine
the highlight cmake config maybe
the following is detail information about my demo