You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a fork of the CMakeLists.txt file used to build the library, I removed all the .h files with no ill effect.
I believe the compiler only needs to know about the .c files to compile, not the headers. This cuts the file size in half and should make it simpler to maintain.
The text was updated successfully, but these errors were encountered:
I used find -name *.c -or -name *.h libsodium (or something similar) to find all files, so creating the lists isn't a big deal, but I agree that it's pretty cluttered.
The reason for adding them like that is to help some IDEs (Visual Studio) find the headers for autocomplete and things like that.
Depending on the CMake version, generators, and options in libsodium you want to support, you could even use file(GLOB_RECURSE SRCS libsodium/*.c CONFIGURE_DEPENDS) to set the entire build tree up as a one-liner and not have to change it when updating libsodium.
Long-term, I might remove the headers, especially as VS's built-in CMake support gets better, but for now they get to stay since I don't think it's much of a maintenance burden.
In a fork of the CMakeLists.txt file used to build the library, I removed all the .h files with no ill effect.
I believe the compiler only needs to know about the .c files to compile, not the headers. This cuts the file size in half and should make it simpler to maintain.
The text was updated successfully, but these errors were encountered: