From 583620302a5d7a9577b342ff3c55926805f4ae23 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 9 May 2021 00:56:13 +0300 Subject: project.cmake: use -DVAR instead of -D VAR This should look prettier in the logs + it's explicitly allowed in the manual. --- project/cmake/build.py | 8 ++++---- project/configuration.py | 2 +- project/toolset.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/project/cmake/build.py b/project/cmake/build.py index e4c7ab9..3c4853d 100644 --- a/project/cmake/build.py +++ b/project/cmake/build.py @@ -88,18 +88,18 @@ class GenerationPhase: librarydir = self.platform.boost_librarydir(self.configuration) librarydir = os.path.join(self.boost_dir, librarydir) return [ - '-D', f'BOOST_ROOT={root}', - '-D', f'BOOST_LIBRARYDIR={librarydir}', + f'-DBOOST_ROOT={root}', + f'-DBOOST_LIBRARYDIR={librarydir}', ] @staticmethod def _cmake_extra_args(): - return ['-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=ON'] + return ['-DCMAKE_EXPORT_COMPILE_COMMANDS=ON'] def _cmake_dir_args(self): args = [] if self.install_dir is not None: - args += ['-D', f'CMAKE_INSTALL_PREFIX={self.install_dir}'] + args += [f'-DCMAKE_INSTALL_PREFIX={self.install_dir}'] # Important! -H must come as the last parameter, older CMake versions # don't like it when it's not. args += [ diff --git a/project/configuration.py b/project/configuration.py index 5bfc317..3a2b2e2 100644 --- a/project/configuration.py +++ b/project/configuration.py @@ -54,7 +54,7 @@ class Configuration(Enum): return str(self) def cmake_build_type(self): - return ['-D', f'CMAKE_BUILD_TYPE={self.build_type()}'] + return [f'-DCMAKE_BUILD_TYPE={self.build_type()}'] def cmake_args(self): args = [] diff --git a/project/toolset.py b/project/toolset.py index 7eeae76..136e6dd 100644 --- a/project/toolset.py +++ b/project/toolset.py @@ -491,7 +491,7 @@ class CMakeCustom(Toolset): config_path = self._cmake_write_config(build_dir, contents) return super().cmake_args(build_dir, platform) + [ - '-D', f'CMAKE_TOOLCHAIN_FILE={config_path}', + f'-DCMAKE_TOOLCHAIN_FILE={config_path}', ] -- cgit v1.2.3