Ejemplo n.º 1
0
    def test_cmake_definitions_cmake_not_in_path(self):
        def raise_get_version():
            raise ConanException('Error retrieving CMake version')

        with patch.object(conans.client.build.cmake.CMakeBuildHelper, "get_version",
                          side_effect=raise_get_version):
            settings_mock = _MockSettings(build_type="Release")
            conanfile = ConanFile(TestBufferConanOutput(), None)
            install_folder = "/c/foo/testing"
            setattr(conanfile, "install_folder", install_folder)
            conanfile.initialize(settings_mock, EnvValues())
            assert CMakeBuildHelper(conanfile)
Ejemplo n.º 2
0
 def conan_set_std_branch():
     # Replicate logic from cmake_common definition of 'macro(conan_set_std)'
     cmake_version = CMakeBuildHelper.get_version()
     return cmake_version < Version("3.12")