Esempio n. 1
0
static void setBuildConfigurationPaths(NameValueFile &file,
                                       OovStringRef const buildConfig, OovStringRef const extraArgs, bool useclang)
{
    std::string optStr = makeBuildConfigArgName(OptExtraBuildArgs, buildConfig);
    file.setNameValue(optStr, extraArgs);

    if(std::string(buildConfig).compare(BuildConfigAnalysis) == 0)
    {
        useclang = true;
    }
    // Assume the archiver is installed and on path.
    // llvm-ar gives link error.
    // setNameValue(makeExeFilename("llvm-ar"));
    optStr = makeBuildConfigArgName(OptToolLibPath, buildConfig);
    file.setNameValue(optStr, FilePathMakeExeFilename("ar"));

    // llvm-nm gives bad file error on Windows, and has no output on Linux.
    // mPathObjSymbol = "makeExeFilename(llvm-nm)";
    optStr = makeBuildConfigArgName(OptToolObjSymbolPath, buildConfig);
    file.setNameValue(optStr, FilePathMakeExeFilename("nm"));

    std::string compiler;
    if(useclang)
        compiler = FilePathMakeExeFilename("clang++");
    else
        compiler = FilePathMakeExeFilename("g++");
    optStr = makeBuildConfigArgName(OptToolCompilePath, buildConfig);
    file.setNameValue(optStr, compiler);

    optStr = makeBuildConfigArgName(OptToolJavaCompilePath, buildConfig);
    file.setNameValue(optStr, "javac");

    optStr = makeBuildConfigArgName(OptToolJavaJarToolPath, buildConfig);
    file.setNameValue(optStr, "jar");
}
Esempio n. 2
0
void CMaker::makeToolchainFiles(OovStringRef const outDir)
    {
    if(mProject.readProject(Project::getProjectDirectory()))
        {
        std::string buildConfigStr = mProject.getValue(OptBuildConfigs);
        if(buildConfigStr.length() > 0)
            {
            CompoundValue buildConfigs(buildConfigStr);
            for(auto const &config : buildConfigs)
                {
                OovString optStr = makeBuildConfigArgName(OptToolCompilePath, config);
                OovString compilePath = mProject.getValue(optStr);

                FilePath outFp(outDir, FP_Dir);
                std::string fn = config + ".cmake";
                outFp.appendFile(fn);
                makeToolchainFile(compilePath, outFp);
                }
            }
        }
    }
Esempio n. 3
0
ScreenOptions::ScreenOptions(OovStringRef const buildConfig, ProjectReader &project,
    GuiOptions &guiOptions):
    mProjectOptions(project),
    mGuiOptions(guiOptions)
    {
    std::string optStr = makeBuildConfigArgName(OptToolCompilePath, buildConfig);
    mBuildScreenOptions.push_back(std::unique_ptr<Option>(new EntryOption(
            optStr, "CompilerPathEntry")));

// Java options are not displayed on the screen yet.
/*
    optStr = makeBuildConfigArgName(OptToolJavaCompilePath, buildConfig);
    mBuildScreenOptions.push_back(std::unique_ptr<Option>(new EntryOption(
            optStr, "JavaCompilerPathEntry")));
*/

    optStr = makeBuildConfigArgName(OptToolLibPath, buildConfig);
    mBuildScreenOptions.push_back(std::unique_ptr<Option>(new EntryOption(
            optStr, "LibraryPathEntry")));

    optStr = makeBuildConfigArgName(OptToolObjSymbolPath, buildConfig);
    mBuildScreenOptions.push_back(std::unique_ptr<Option>(new EntryOption(
            optStr, "SymbolPathEntry")));


    mBuildScreenOptions.push_back(std::unique_ptr<Option>(new TextViewOption(OptBaseArgs,
            "CppArgumentsTextview")));

    mBuildScreenOptions.push_back(std::unique_ptr<Option>(new TextViewOption(
            makeBuildConfigArgName(OptExtraBuildArgs, buildConfig),
            "ExtraBuildArgsTextview")));

    // Editor
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new EntryOption(
            OptGuiEditorPath, "EditorPathEntry")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new EntryOption(
            OptGuiEditorLineArg, "EditorLineArgEntry")));
    mBuildScreenOptions.push_back(std::unique_ptr<Option>(new EntryOption(
            OptToolDebuggerPath, "DebuggerPathEntry")));

    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowAttributes, "ShowAttributesCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowOperations, "ShowOperationsCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowOperParams, "ShowOperParamsCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowOperReturn, "ShowOperReturnCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowAttrTypes, "ShowAttrTypesCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowOperTypes, "ShowOperTypesCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowPackageName, "ShowPackageNameCheckbutton")));

    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowOovSymbols, "ShowOovSymbolsCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowTemplateRelations, "ShowTemplateRelationsCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowOperParamRelations, "ShowOperParamRelationsCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowOperBodyVarRelations, "ShowOperBodyVarRelationsCheckbutton")));
    mGuiScreenOptions.push_back(std::unique_ptr<Option>(new CheckOption(
            OptGuiShowRelationKey, "ShowRelationKeyCheckbutton")));
    }