CMake/Windows bugfix: Make CMAKE_INSTALL_PREFIX a posix path (#36842)
CMake gives off a warning when passed Windows style paths as install prefixes as the resultant path often causes invalid escape sequences.
This commit is contained in:
parent
4ae1a73d54
commit
06817600e4
1 changed files with 2 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
import collections.abc
|
||||
import inspect
|
||||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import re
|
||||
import sys
|
||||
|
@ -15,7 +16,6 @@
|
|||
import spack.build_environment
|
||||
import spack.builder
|
||||
import spack.package_base
|
||||
import spack.util.path
|
||||
from spack.directives import build_system, conflicts, depends_on, variant
|
||||
from spack.multimethod import when
|
||||
|
||||
|
@ -271,7 +271,7 @@ def std_args(pkg, generator=None):
|
|||
args = [
|
||||
"-G",
|
||||
generator,
|
||||
define("CMAKE_INSTALL_PREFIX", pkg.prefix),
|
||||
define("CMAKE_INSTALL_PREFIX", pathlib.Path(pkg.prefix).as_posix()),
|
||||
define("CMAKE_BUILD_TYPE", build_type),
|
||||
define("BUILD_TESTING", pkg.run_tests),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue