def generate(self): toolchain_file = self._conanfile.conf["tools.cmake.cmaketoolchain:toolchain_file"] if toolchain_file is None: # The main toolchain file generated only if user dont define save(self.filename, self.content) # Generators like Ninja or NMake requires an active vcvars if self.generator is not None and "Visual" not in self.generator: VCVars(self._conanfile).generate() self._writebuild(toolchain_file)
def generate(self): toolchain_file = self._conanfile.conf["tools.cmake.cmaketoolchain:toolchain_file"] if toolchain_file is None: # The main toolchain file generated only if user dont define save(self.filename, self.content) # If we're using Intel oneAPI, we need to generate the environment file and run it if self._conanfile.settings.get_safe("compiler") == "intel-cc": IntelCC(self._conanfile).generate() # Generators like Ninja or NMake requires an active vcvars elif self.generator is not None and "Visual" not in self.generator: VCVars(self._conanfile).generate() self._writebuild(toolchain_file)
def generate(self): toolchain_file = self._conanfile.conf.get( "tools.cmake.cmaketoolchain:toolchain_file") if toolchain_file is None: # The main toolchain file generated only if user dont define save( os.path.join(self._conanfile.generators_folder, self.filename), self.content) # If we're using Intel oneAPI, we need to generate the environment file and run it if self._conanfile.settings.get_safe("compiler") == "intel-cc": IntelCC(self._conanfile).generate() # Generators like Ninja or NMake requires an active vcvars elif self.generator is not None and "Visual" not in self.generator: VCVars(self._conanfile).generate() toolchain = os.path.join(self._conanfile.generators_folder, toolchain_file or self.filename) write_cmake_presets(self._conanfile, toolchain, self.generator)
def generate(self, env=None, scope="build"): env = env or self.environment() env = env.vars(self._conanfile, scope=scope) env.save_script("conanautotoolstoolchain") self.generate_args() VCVars(self._conanfile).generate(scope=scope)
def generate(self): filename = self.native_filename if not self.cross_build else self.cross_filename save(filename, self.content) # FIXME: Should we check the OS and compiler to call VCVars? VCVars(self._conanfile).generate()
def generate(self): if cross_building(self._conanfile): self._write_cross_file() else: self._write_native_file() VCVars(self._conanfile).generate()