aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c954634..bf97450 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -127,6 +127,7 @@ static void usage()
printf(" test\t\tBuild and run tests for a sibs project\n");
printf(" package\t\tCreate a redistributable package from a sibs project. Note: Redistributable packages can't use system packages to build\n");
printf(" platform\t\tPrint name of platform (to stdout) and exit\n");
+ printf(" platforms\t\tPrint list of supported platforms (to stdout) and exit\n");
exit(1);
}
@@ -138,7 +139,7 @@ static void usageBuild()
printf(" project_path\t\tThe directory containing a project.conf file - Optional (default: current directory)\n");
printf(" --debug|--release\t\tOptimization level to build project and dependencies with (if not a system package) - Optional (default: --debug)\n");
printf(" --sanitize\t\tAdd runtime address/undefined behavior sanitization. Program can be up to 3 times slower and use 10 times as much RAM. Ignored if compiler doesn't support sanitization - Optional (default: disabled)\n");
- printf(" --platform\t\tThe platform to build for - Optional (default: the running platform). Platform can be either linux32, linux64, win32 or win64\n");
+ printf(" --platform\t\tThe platform to build for - Optional (default: the running platform)\n");
printf("Examples:\n");
printf(" sibs build\n");
printf(" sibs build dirA/dirB\n");
@@ -522,13 +523,14 @@ static int buildProject(int argc, const _tinydir_char_t **argv)
if(platform == PLATFORM_INVALID)
{
ferr << "Invalid platform " << platformName << endl;
+ ferr << "Expected one of: " << getPlatformListFormatted() << std::endl;
usageBuild();
}
- bool crossCompileLinux64ToWin64 = (SYSTEM_PLATFORM == PLATFORM_LINUX64 && platform == PLATFORM_WIN64);
+ bool crossCompileLinux64ToWin64 = (SYSTEM_PLATFORM == PLATFORM_LINUX_X86_64 && platform == PLATFORM_WIN64);
if(platform != SYSTEM_PLATFORM && !crossCompileLinux64ToWin64)
{
- ferr << "Cross compilation is currently only supported from linux64 to win64" << endl;
+ ferr << "Cross compilation is currently only supported from linux_X86_64 to win64" << endl;
exit(33);
}
@@ -1434,6 +1436,11 @@ int wmain(int argc, const _tinydir_char_t **argv)
printf("%s\n", asString(SYSTEM_PLATFORM));
return 0;
}
+ else if(_tinydir_strcmp(arg, TINYDIR_STRING("platforms")) == 0)
+ {
+ printf("%s\n", getPlatformListFormatted().c_str());
+ return 0;
+ }
else
{
ferr << "Expected command to be either 'build', 'new' or 'test', was: " << arg << endl << endl;