Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property file user macros not parsed ahead of time #126

Open
palmada opened this issue Mar 22, 2021 · 0 comments
Open

Property file user macros not parsed ahead of time #126

palmada opened this issue Mar 22, 2021 · 0 comments

Comments

@palmada
Copy link

palmada commented Mar 22, 2021

Describe the bug
I installed the latest version just now and tried to run on a project that has several .vcxproj in sub-folders. Because each of these might require common libraries stored elsewhere, I have defined a property file that includes the following:

  <PropertyGroup Label="UserMacros">
    <SpecificLibraryLocation>$(ENV_LOCATION)</SpecificLibraryLocation>
    <AnotherLibraryLocation>$(ANOTHER_ENV_LOCATION)</AnotherLibraryLocation>
  </PropertyGroup>

In my particular case, each is referring to an environment variable in path (so there are no hard-coded locations for external libraries in the code). However, whenever I try to run cmakeconverter I get the following type of error:

ERR : file:/path/to/vcxproj(71): /path/to/vcxproj/\$(SpecificLibraryLocation)/location/pointed/to/in/property/file/.vcxproj file not exists.

Since the error message shows the structure /path/to/vcxproj/, with \$(SpecificLibraryLocation) followed by /location/pointed/to/in/property/file/.vcxproj, I believe this error comes from not parsing user macros in property files ahead of time, as well as assuming all projects are in the same working directory.

To Reproduce
Steps to reproduce the behavior:

  1. Create a solution with several vcxproj files
  2. Make each sub-project depend on an external library defined in a property file
  3. The library location should be pointed to by an environmental variable

Expected behavior
The cmakeconverter should first read all property files and check for $(VAR) entries. Replace each with the corresponding environmental variable. Then load user macro entries as path variables, and parse project file locations accordingly.

@palmada palmada changed the title Does not take environmental variables defined in property files into account. Property file user macros not parsed ahead of time Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant