Skip to content

Commit

Permalink
add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgsogo committed Mar 2, 2020
1 parent 2c5ed52 commit a254cd0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions conans/test/unittests/client/build/cmake_test.py
Expand Up @@ -1439,3 +1439,21 @@ def test_cmake_system_version_windowsce(self):
conanfile.settings = settings
cmake = CMake(conanfile)
self.assertEqual(cmake.definitions["CMAKE_SYSTEM_VERSION"], "8.0")

def test_cmake_vs_arch(self):
settings = Settings.loads(default_settings_yml)
settings.os = "Windows"
settings.arch = "x86_64"
settings.compiler = "Visual Studio"
settings.compiler.version = "15"

conanfile = ConanFileMock()
conanfile.settings = settings

cmake = CMake(conanfile, generator="Visual Studio 15 2017 Win64", toolset="v141,host=x64")
self.assertIn('-G "Visual Studio 15 2017 Win64"', cmake.command_line)
self.assertIn('-T "v141,host=x64"', cmake.command_line)

cmake = CMake(conanfile, generator="Visual Studio 15 2017", generator_platform="x64", toolset="v141,host=x64")
self.assertIn('-G "Visual Studio 15 2017 Win64"', cmake.command_line)
self.assertIn('-T "v141,host=x64"', cmake.command_line)

0 comments on commit a254cd0

Please sign in to comment.