aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'project/cmake')
-rw-r--r--project/cmake/build.py2
-rw-r--r--project/cmake/toolchain.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/project/cmake/build.py b/project/cmake/build.py
index d2c2070..ee5772e 100644
--- a/project/cmake/build.py
+++ b/project/cmake/build.py
@@ -34,7 +34,7 @@ from project.toolchain import ToolchainType
from project.utils import normalize_path, run, setup_logging
-DEFAULT_PLATFORM = Platform.native()
+DEFAULT_PLATFORM = None
DEFAULT_CONFIGURATION = Configuration.DEBUG
DEFAULT_TOOLSET = ToolchainType.AUTO
diff --git a/project/cmake/toolchain.py b/project/cmake/toolchain.py
index 7966192..32831b2 100644
--- a/project/cmake/toolchain.py
+++ b/project/cmake/toolchain.py
@@ -138,6 +138,12 @@ class Toolchain(abc.ABC):
@staticmethod
def detect(hint, platform, build_dir):
if hint is ToolchainType.AUTO:
+ # If the platform wasn't specified, auto-detect everything.
+ # There's no need to set -mXX flags, etc.
+ if platform is None:
+ return Auto()
+ # If a specific platform was requested, we might need to set some
+ # CMake/compiler flags.
if on_windows():
# We need to specify the -A parameter. This might break if
# none of the Visual Studio generators are available, but the