aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-09 00:46:27 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-09 00:48:37 +0300
commitf9a63680b8ee5927255eebd60a41738b5c1f2bf4 (patch)
tree54e160a93b93819db0010eeed190682f6a58ea39
parentv3.0 (diff)
downloadcmake-common-f9a63680b8ee5927255eebd60a41738b5c1f2bf4.tar.gz
cmake-common-f9a63680b8ee5927255eebd60a41738b5c1f2bf4.zip
project.cmake: always enable CMAKE_EXPORT_COMPILE_COMMANDS
-rw-r--r--project/cmake/build.py5
1 files changed, 5 insertions, 0 deletions
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: