|
|
|
|
@ -45,6 +45,7 @@ int main(int argc, char** argv)
|
|
|
|
|
argParser.AddArg(ArgDesc("-x", true, 1, "Add executable submodule projects, separated by ',' (ex: -x first,second,third)"));
|
|
|
|
|
argParser.AddArg(ArgDesc("-r", true, 0, "Remove the root project executable"));
|
|
|
|
|
argParser.AddArg(ArgDesc("-gs", true, 0, "Add git subsystem updating to the main cmake file."));
|
|
|
|
|
argParser.AddArg(ArgDesc("-b", true, 1, "Set the default compiler on windows (msvc, clang). Default is msvc"));
|
|
|
|
|
|
|
|
|
|
bool result = argParser.Parse();
|
|
|
|
|
|
|
|
|
|
@ -496,7 +497,15 @@ int main(int argc, char** argv)
|
|
|
|
|
ofs << "\n echo Build mode is Debug";
|
|
|
|
|
ofs << "\n)";
|
|
|
|
|
ofs << "\necho using options %options%";
|
|
|
|
|
|
|
|
|
|
if (argParser.ContainsOption("-b") && jpUtils::StringManip::ToLower(argParser.GetOptionValue("-b").values[0]) == "msvc")
|
|
|
|
|
{
|
|
|
|
|
ofs << "\ncmake -Wno-dev %build_type% %options% -B build/ -S . -G " << vs_version.c_str() << " -A x64";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ofs << "\ncmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -Wno-dev -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang %build_type% %options% -B build/ -S . -G Ninja";
|
|
|
|
|
}
|
|
|
|
|
ofs << "\ngoto exit";
|
|
|
|
|
|
|
|
|
|
ofs << "\n";
|
|
|
|
|
@ -554,7 +563,15 @@ int main(int argc, char** argv)
|
|
|
|
|
ofs << "\n)";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (argParser.ContainsOption("-b") && jpUtils::StringManip::ToLower(argParser.GetOptionValue("-b").values[0]) == "msvc")
|
|
|
|
|
{
|
|
|
|
|
ofs << "\ncmake --build build/ --target ALL_BUILD";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ofs << "\ncmake --build build/ --target all";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ofs << "\n\nSET BUILD_ERRORLEVEL=!ERRORLEVEL!";
|
|
|
|
|
ofs << "\nIF NOT \"!BUILD_ERRORLEVEL!\"==\"0\" (";
|
|
|
|
|
ofs << "\n\techo %ESC%[91mBUILD FAILED!%ESC%[0m %BUILD_ERRORLEVEL%";
|
|
|
|
|
|