]> git.ipfire.org Git - thirdparty/openvpn.git/commit
cmake: symlink whole build dir not just .json file
authorHeiko Hund <heiko@ist.eigentlich.net>
Wed, 17 Jan 2024 13:49:29 +0000 (14:49 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 17 Jan 2024 14:01:54 +0000 (15:01 +0100)
commit4bcb38c42ae62a3c3511511eb4ffe0d66b8e32eb
treeb26ef2bf8c8ee8a5f4d9558e9f689298d445520e
parent6e010d4824b7251d817cf1770e80f186000b99ae
cmake: symlink whole build dir not just .json file

It turned out that symlinking compile_commands.json from the top level
source dir has some issues:
  * file is not created on Windows and symlinking may cause an error
  * some IDEs create their own json and error out b/c a file exists

Since clangd also looks for the json in build/ directories by default,
we now symlink the whole build directory instead, not just the json file.

This approach requires for the existing build/ dir in the repo to
vanish. Luckily it only contains one automake include file, which is
moved to the top level source dir.

Lastly, make this an opt-in feature, so that the default configuration
of the buildsystem never causes a build failure because of this.

Change-Id: Ib1a5c788269949d8de95d1da2cb0c32a65bf13f2
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20240117134929.5317-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28061.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
.gitignore
CMakeLists.txt
Makefile.am
README.cmake.md
build/Makefile.am [deleted file]
configure.ac
ltrc.inc [moved from build/ltrc.inc with 100% similarity]
src/openvpn/Makefile.am
src/openvpnmsica/Makefile.am
src/openvpnserv/Makefile.am
src/tapctl/Makefile.am