Skip to content

Commit

Permalink
CMakeToolchain customization and extensibility mechanism (#8749)
Browse files Browse the repository at this point in the history
* working in new extensibility mechanism

* fix bug

* wip

* wip

* wip

* wip

* change order blocks

* config_paths block and working in Android in Win

* extensibility and customization framework

* fix py27 test
  • Loading branch information
memsharded committed Apr 6, 2021
1 parent 1bdb0de commit 5861e38
Show file tree
Hide file tree
Showing 13 changed files with 730 additions and 627 deletions.
3 changes: 3 additions & 0 deletions conan/tools/_compilers.py
Expand Up @@ -10,6 +10,9 @@ def architecture_flag(settings):
if not compiler or not arch:
return ""

if the_os == "Android":
return ""

if str(compiler) in ['gcc', 'apple-clang', 'clang', 'sun-cc']:
if str(the_os) == 'Macos' and str(subsystem) == 'catalyst' and str(arch) == 'x86_64':
# FIXME: This might be conflicting with Autotools --target cli arg
Expand Down
68 changes: 0 additions & 68 deletions conan/tools/cmake/android.py

This file was deleted.

193 changes: 0 additions & 193 deletions conan/tools/cmake/base.py

This file was deleted.

5 changes: 2 additions & 3 deletions conan/tools/cmake/cmake.py
@@ -1,7 +1,7 @@
import os
import platform

from conan.tools.cmake.base import CMakeToolchainBase
from conan.tools.cmake import CMakeToolchain
from conan.tools.cmake.utils import get_generator, is_multi_configuration
from conan.tools.gnu.make import make_jobs_cmd_line_arg
from conan.tools.meson.meson import ninja_jobs_cmd_line_arg
Expand All @@ -13,7 +13,6 @@
from conans.client.tools.oss import cpu_count, args_to_string
from conans.errors import ConanException
from conans.util.conan_v2_mode import conan_v2_error
from conans.util.env_reader import get_env
from conans.util.files import mkdir


Expand Down Expand Up @@ -91,7 +90,7 @@ def configure(self, source_folder=None):

mkdir(build_folder)
arg_list = '-DCMAKE_TOOLCHAIN_FILE="{}" -DCMAKE_INSTALL_PREFIX="{}" "{}"'.format(
CMakeToolchainBase.filename,
CMakeToolchain.filename,
self._conanfile.package_folder.replace("\\", "/"),
source)

Expand Down

0 comments on commit 5861e38

Please sign in to comment.