Search in sources :

Example 1 with CidrCompilerSwitches

use of com.jetbrains.cidr.lang.toolchains.CidrCompilerSwitches in project intellij by bazelbuild.

the class BlazeCompilerSettingsTest method testCompilerSwitchesSimple.

@Test
public void testCompilerSwitchesSimple() {
    File cppExe = new File("bin/cpp");
    ImmutableList<String> cFlags = ImmutableList.of("-fast", "-slow");
    CompilerInfoCache compilerInfoCache = new CompilerInfoCache();
    BlazeCompilerSettings settings = new BlazeCompilerSettings(getProject(), cppExe, cppExe, cFlags, cFlags, "cc version (trunk r123456)", compilerInfoCache);
    CidrCompilerSwitches compilerSwitches = settings.getCompilerSwitches(OCLanguageKind.C, null);
    List<String> commandLineArgs = CidrCompilerSwitchesAdapter.getFileArgs(compilerSwitches);
    assertThat(commandLineArgs).containsExactly("-fast", "-slow");
}
Also used : CidrCompilerSwitches(com.jetbrains.cidr.lang.toolchains.CidrCompilerSwitches) CompilerInfoCache(com.jetbrains.cidr.toolchains.CompilerInfoCache) File(java.io.File) Test(org.junit.Test)

Aggregations

CidrCompilerSwitches (com.jetbrains.cidr.lang.toolchains.CidrCompilerSwitches)1 CompilerInfoCache (com.jetbrains.cidr.toolchains.CompilerInfoCache)1 File (java.io.File)1 Test (org.junit.Test)1