[libcxx-commits] [libcxx] [libcxx] Add libcxx/include directory to LIBCXX_CONFIGURE_IDE dummy test target includes (PR #83247)

Rodrigo Salazar via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 29 03:26:31 PST 2024


4-rodrigo-salazar wrote:

Hi @ldionne

Just to provide all context to other people potentially reading: At the root of it, since llvm-lit cpp sources do not belong to any CMake project, it makes IDEs like CLion unaware of what flags they may be compiled in so they are unable to know where includes are located. The `libcxx_test_objects` IDE target is essentially a workaround the llvm-lit design.

Your suggestion of deleting this doesn't sound like a bad option at all. There is a nice workaround for local development where any dev can create their own CMakeLists.txt out of the repo, include_subdirectory for runtimes/, and then create these same IDE targets for usage within their workspace (and customize it even further if they wish!). Since you've asked about deleting it, I've just tried this approach and it's acceptable.

If we take it as an assumption that this ide target is valuable for developers using IDEs (and that developers using properly configured IDEs is valuable), then the question boils down to: `Should libcxx be able to automatically integrate well with IDEs as a cmake project, or do we leave that as an exercise for new developers?` 

I personally think it's valuable that a project just works in an IDE when you open it. If this IDE target didn't exist in the codebase already, then actually I'm not sure I would have found this workaround. 

How would you feel about me deleting LIBCXX_CONFIGURE_IDE and adding an IDE section to the building libcxx wiki which explains the workaround (which as far as I know if the best option)?

_Side question, what is your development set-up for libcxx (do you use an IDE, and does it use cmake to determine its configuration)?_

Thanks @ldionne !

https://github.com/llvm/llvm-project/pull/83247


More information about the libcxx-commits mailing list