RA-Consulting-GmbH / openscenario.api.test

Apache License 2.0
38 stars 11 forks source link

no antlr rebuild for debug / release switching in Visual Studio #174

Open Deakon997 opened 1 year ago

Deakon997 commented 1 year ago

Describe the bug When switch the build type from release to debug or back in Visual Studio then antlr does not rebuild for the selected build type causing the build to fail. To solve this one has to

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo
  2. Configure and generate with cmake-gui for Visual Studio
  3. Compile the solution (default is debug)
  4. Switch to release
  5. Compile the solution
  6. See that linking fails

Expected behavior antlr should be rebuild automatically.

Desktop (please complete the following information):

ZhimingWu89 commented 10 months ago

@Deakon997 Maybe it's related to the issue I was dealing with. It seems this line unset(CMAKE_BUILD_TYPE CACHE) unset the CMAKE_BUILD_TYPE in the whole CMake environment and will affect the following configuration, if this parameter is used further in other libraries. If the library is built as standalone library, there is no problem. It happens when I tried to integrate the library into the project.

Deakon997 commented 10 months ago

@ZhimingWu89 thank you for the hint. I currently and will be back at the office on Monday to investigate the issue and check if I can properly fix it.