Community
Participate
Working Groups
Set a variable using the Eclipse preference C/C++, Build, Build Variables. Add a variable and give it a value. RELEASE_LIBRARIES_DIRECTORY_OPTION=VAL Now build a C/C++ project, where the command in the build configuration uses RELEASE_LIBRARIES_DIRECTORY_OPTION. The value of RELEASE_LIBRARIES_DIRECTORY_OPTION is not used properly until the second build. I can see the wrong value being placed in the console for the first build, but appear correctly in the second build. For my build configuration I have the following project properties. C/C++ Build Builder Settings Build command: hyperx_ Build (Incremental Build): build.tcl ${HWMODEL_OPTION} ${RELEASE_LIBRARIES_DIRECTORY_OPTION} hyperx_ is a tcl interpreter. I came across the problem by setting a variable programmatically rather than through Eclipse preferences. IUserVarSupplier fUserSup = CCorePlugin.getUserVarSupplier(); IStorableCdtVariables workspaceVariablesCopy = fUserSup.getWorkspaceVariablesCopy(); workspaceVariablesCopy.createMacro(name, type, value); fUserSup.setWorkspaceVariables(workspaceVariablesCopy); fUserSup.storeWorkspaceVariables(true); The same delayed effect occurs. Is there a programmatic workaround I can use now to tell the CDT builder to, say, flush a cache? Bug 244438 may be related.