Coder Social home page Coder Social logo

Comments (5)

nemtrif avatar nemtrif commented on June 2, 2024

I can certainly do it.

But why are you even running the utf8 cpp CMake build? Its only purpose is to run the tests. The library itself is header-only - you just include it in your source tree and compile with whatever CMake version you are using.

from utfcpp.

HerrNamenlos123 avatar HerrNamenlos123 commented on June 2, 2024

Well, I depend on utfcpp like on dozens of other libraries and all of them are included the same way: add_subdirectory() and target_link_libraries(). That's it. All I want to say is that my project depends on utfcpp. Everything else is unnecessary implementation details that I do not want to care about.

I do not want to care about

  • Where the files are stored
  • Which files to include
  • How they are named
  • And to maintain all of this

I used this library just like this for years and I only realized just recently that it is header-only. I did not even know this fact for a long time, because it is unnecessary to know for me.

Besides that, your CMakeLists.txt is already structured perfectly, so that it can be used for both, why not use CMake if it's already there. Your project itself knows best how to include it. It has all the things: ${IS_ROOT_PROJECT}, if (UTF8_TESTS), and so on. It certainly looks like it is made for including from a subproject, not just for building unit tests.

As said, it worked perfectly for years for me, it only just recently started spitting out warnings because of the latest CMake version. It would be a significant downgrade to not use it and write my own CMake lines to include the headers instead of using what's already there.

from utfcpp.

nemtrif avatar nemtrif commented on June 2, 2024

Alright. I set cmake_minimum_required as you suggested.

Just another question: would implementing #54 affect your builds?

from utfcpp.

HerrNamenlos123 avatar HerrNamenlos123 commented on June 2, 2024

This PR would indeed affect it because I include the library with #include <utf8.h>. However, I would be happy to change it in the future for the sake of correctness. Currently there is still potential for including the wrong file, which would not be there if it was utfcpp/utf8.h. Same for the CMake name as i mentioned. I am by the way using the library via its tag/release, so it would be great if you could create a new release again when it is finished.

No need to hold back from changes because of me :)

from utfcpp.

HerrNamenlos123 avatar HerrNamenlos123 commented on June 2, 2024

Thank you for the change!

from utfcpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.