Skip to content

Commit

Permalink
fix CMake folder when running on drive (#16180)
Browse files Browse the repository at this point in the history
* fix CMake folder when running on drive

* fix unit test
  • Loading branch information
memsharded authored Apr 30, 2024
1 parent 2326609 commit 0188808
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions conan/tools/cmake/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ def configure(self, variables=None, build_script_folder=None, cli_args=None,
cmakelist_folder = self._conanfile.source_folder
if build_script_folder:
cmakelist_folder = os.path.join(self._conanfile.source_folder, build_script_folder)
cmakelist_folder = cmakelist_folder.replace("\\", "/")

build_folder = self._conanfile.build_folder
generator_folder = self._conanfile.generators_folder

mkdir(self._conanfile, build_folder)

arg_list = [self._cmake_program]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def run(command, **kwargs):
assert '-DCMAKE_MAKE_PROGRAM="C:/mymake.exe"' in command

conanfile.run = run
conanfile.folders.set_base_source(temp_folder())
conanfile.conf.define("tools.gnu:make_program", "C:\\mymake.exe")

with mock.patch("platform.system", mock.MagicMock(return_value='Windows')):
Expand Down

0 comments on commit 0188808

Please sign in to comment.