예제 #1
0
 def build(self):
     cmake = conans.CMake(self.settings)
     # Current dir is 'test_package/build/<build_id>'
     # and CMakeLists.txt is in 'test_package'
     cmake.configure(
         self, source_dir=self.conanfile_directory, build_dir='./'
     )
     cmake.build(self)
예제 #2
0
    def _configure_cmake(self):
        cmake = conans.CMake(self)
        cmake.definitions["AEH_BUILD_TESTS"] = self.options.with_unit_tests
        cmake.definitions["AEH_WITH_SDL2"] = self.options.with_sdl2
        cmake.definitions["AEH_WITH_IMGUI"] = self.options.with_imgui
        cmake.definitions["AEH_WITH_GLM"] = self.options.with_glm
        cmake.definitions[
            "TREAT_WARNINGS_AS_ERRORS"] = self.options.with_unit_tests
        cmake.configure()

        return cmake
예제 #3
0
    def _configed_cmake(self):
        cmake = conans.CMake(self)

        # The source CMake file could possibly be updated to build these tools
        # using a toolchain on the build OS rather than the destination OS
        # somehow, but just work around it in Emscripten.
        arch = self.settings.get_safe('arch')
        if arch.startswith("asm.js"):
            cmake.definitions["BGFX_BUILD_TOOLS"] = "FALSE"

        cmake.configure(source_folder=str(self._source_path / "root"))
        return cmake
예제 #4
0
  def build(self):
    """Builds this package and optionally runs tests for it."""
    # Build this package using CMake.
    cmake = conans.CMake(self.settings)

    cmake_test_def = "-DOOMUSE_MATH_TESTING=1" if self.options.testing else ""
    self.run("cmake %s %s %s" % (self.conanfile_directory,
                                 cmake.command_line,
                                 cmake_test_def))
    self.run("cmake --build . %s" % cmake.build_config)

    # If testing, run unit tests to make sure library works before packaging.
    if self.options.testing:
      self.run("ctest -C %s --output-on-failure" % self.settings.build_type)
    def build(self):
        # .conanfile_directory
        cmake = conans.CMake(self)

        args = []
        defs = {}
        if self.scope.verbose:
            defs['CMAKE_VERBOSE_MAKEFILE'] = 'ON'
        else:
            defs['CMAKE_VERBOSE_MAKEFILE'] = 'OFF'

        self.output.info('Creating build scripts')
        cmake.configure(args, defs)

        self.output.info('Compiling')
        cmake.build()

        self.output.info('Running tests')
        cmake.build(target='test')
예제 #6
0
 def build(self):
     cmake = conans.CMake(self)
     # Current dir is "test_package/build/<build_id>" and CMakeLists.txt is
     # in "test_package"
     cmake.configure()
     cmake.build()
예제 #7
0
파일: conanfile.py 프로젝트: fradav/pmm
 def build(self):
     cmake = conans.CMake(self)
     cmake.configure()
     cmake.build()
예제 #8
0
 def _configed_cmake(self):
     cmake = conans.CMake(self)
     cmake.configure(defs={
         "LP3_SDL_Build_Tests": self.tests_enabled,
     })
     return cmake
예제 #9
0
 def _configed_cmake(self):
     cmake = conans.CMake(self)
     lua_dir = pathlib.Path(self.source_folder) / self.lua_dir
     cmake.configure(source_folder=str(lua_dir))
     return cmake
예제 #10
0
 def build(self):
     cmake = conans.CMake(self.settings)
     shared = '-DBUILD_SHARED_LIBS=ON' if self.options.shared else ''
     self.run('cmake hello {} {}'.format(cmake.command_line, shared))
     self.run('cmake --build . {}'.format(cmake.build_config))
예제 #11
0
 def build(self):
     for bt in ('Debug', 'Release'):
         cmake = conans.CMake(self, build_type=bt)
         cmake.configure()
         cmake.build()