diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index 7fff3771e9b..3b3b61f1153 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -248,7 +248,8 @@ def std_cmake_args(self): @staticmethod def std_args(pkg, generator=None): """Computes the standard cmake arguments for a generic package""" - generator = generator or "Unix Makefiles" + default_generator = "Ninja" if sys.platform == "win32" else "Unix Makefiles" + generator = generator or default_generator valid_primary_generators = ["Unix Makefiles", "Ninja"] primary_generator = _extract_primary_generator(generator) if primary_generator not in valid_primary_generators: diff --git a/lib/spack/spack/test/build_systems.py b/lib/spack/spack/test/build_systems.py index 54ed485f250..79cea99eeba 100644 --- a/lib/spack/spack/test/build_systems.py +++ b/lib/spack/spack/test/build_systems.py @@ -23,8 +23,6 @@ DATA_PATH = os.path.join(spack.paths.test_path, "data") -pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") - @pytest.fixture() def concretize_and_setup(default_mock_concretization): @@ -45,6 +43,7 @@ def _func(dir_str): return _func +@pytest.mark.skipif(sys.platform == "win32", reason="make not available on Windows") @pytest.mark.usefixtures("config", "mock_packages", "working_env") class TestTargets: @pytest.mark.parametrize( @@ -93,6 +92,7 @@ def test_negative_ninja_check(self, input_dir, test_dir, concretize_and_setup): s.package._if_ninja_target_execute("check") +@pytest.mark.skipif(sys.platform == "win32", reason="autotools not available on windows") @pytest.mark.usefixtures("config", "mock_packages") class TestAutotoolsPackage: def test_with_or_without(self, default_mock_concretization):