Comments (7)
Could you please explain what referenced from a location inside the project. does mean?
from cmake4eclipse.
I suppose he meant passing a file in the project as parameter to cmake.
In case this is bug report is not clear, you can`t access system or userdefined variables that are managed in the Build Variables preferences, particularly when defining cmake cache variables
from cmake4eclipse.
Further, if setting/override any environment Variables in CDT (like PATH) will have no effect, the base Eclipse definitions will be used
from cmake4eclipse.
I'm currently using project_loc variable here. When I tried using ProjDirPath it didn't work.
from cmake4eclipse.
Could you post the cmake invokation line shown in 'CMake Console' here.
I cannot reproduce it here, I get
cmake ... -DVAREXPAND:FILEPATH=/home/.../cmake4eclipsecdt/testprojects/C-subsrc/src/../bald -G "Unix Makefiles" /home/.../cmake4eclipsecdt/testprojects/C-subsrc/src
which shows that variables get properly expanded.
from cmake4eclipse.
Edited
I am now using cmake4eclipse with multiple projects / multiple configurations and experience problems with the evaluation of the variables as well.
When changing environments, the evaluation sometimes sticks to the value used in the old environment, sometimes it does not evaluate at all (logs an Exception).
I have no simple case that removes the sometimes from the above description.
When defining a C/C++ Build / Build Variable this variable is NOT expanded in the Cmake symbols.
To reproduce:
In C/C++ Build / Build Variable
: Define for each Configuration a build Variable ConfigName with the proposed default value of the Eclipse variable ConfigName.
In C/C++ Build / CMake / Symbols
: Define for each Configuration a -D
CMAKE_INSTALL_PREFIX, FILEPATH,${project_loc}/target/${ConfigName}
Rebuild the project.
cmake4eclipse
will emit on the command line for each distinct configuration
-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\keve\git\scratch\testlib/target/${ConfigName}
, i.e. ${project_loc} got expanded, ${ConfigName} did not get expanded.
This means that the currently building config name is inaccessible to cmake. I tried ${config_name:${project_name}}, but this resolves to the active config name of the project, which does not change in a Build all setting.
from cmake4eclipse.
Indeed, the plugin uses org.eclipse.core.variables.VariablesPlugin
to expand variables. The VariablesPlugin only knows a few variables like project_loc. You can see the full list of variables, if you open a Run configuration and open the Variables... dialog.
The CDT project re-invented the wheel and introduced the org.eclipse.cdt.core.cdtvariables.ICdtVariableManager
which is pre-populated with all system environment vars and gives you the ${ConfigName} plus the stuff you add under Build Variables in the project dialog..
At least, the current behavior of variable expansion is in sync with the variables that show up if you open the Variables-dialog on the CMake | Symbols tab.
So this issue is not a bug.
from cmake4eclipse.
Related Issues (20)
- Can be the path to CMakeLists.txt changed? HOT 2
- CMake Compilation DB Provider include pathes pointing nowhere HOT 4
- Cannot override Generator per project using CMAKE_GENERATOR variable HOT 1
- "CMake Compilation DB" provider provides C++ include paths for C language HOT 3
- Specify cmake executable HOT 1
- Adding cmake cache entries corrupts the file .cproject HOT 5
- Default build tool HOT 1
- Include directories are not updated automatically (CMake Compilation DB) HOT 5
- add external library and add_subdirectory to project tree HOT 8
- The subdirectory entry is printed in red HOT 2
- de.marw.cmake4eclipse.mbs.settings::buildDir is set to "" HOT 5
- After changing the build configuration, cmake generation does not start. HOT 4
- incompatibility with eclipse 2023-12 HOT 7
- Eclipse can't find arm-none-eabi-gdb.exe HOT 4
- Cmake4eclipse Managed Build wizard missing HOT 2
- NPE when managing multiple configurations
- Cmake file-api support HOT 2
- Add selection of docker network type when building in container HOT 2
- Sometimes after a clean, software is build in root project HOT 4
- cmake-presets support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmake4eclipse.