From f9a63680b8ee5927255eebd60a41738b5c1f2bf4 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 9 May 2021 00:46:27 +0300 Subject: project.cmake: always enable CMAKE_EXPORT_COMPILE_COMMANDS --- project/cmake/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/project/cmake/build.py b/project/cmake/build.py index c02f102..e4c7ab9 100644 --- a/project/cmake/build.py +++ b/project/cmake/build.py @@ -74,6 +74,7 @@ class GenerationPhase: result += toolset.cmake_args(self.build_dir, self.platform) result += self.configuration.cmake_args() result += self._cmake_boost_args() + result += self._cmake_extra_args() result += self.cmake_args # Important! -H must come as the last parameter, older CMake versions # don't like it when it's not. @@ -91,6 +92,10 @@ class GenerationPhase: '-D', f'BOOST_LIBRARYDIR={librarydir}', ] + @staticmethod + def _cmake_extra_args(): + return ['-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=ON'] + def _cmake_dir_args(self): args = [] if self.install_dir is not None: -- cgit v1.2.3