Skip to content

Conversation

matthauck
Copy link
Contributor

No description provided.

@matthauck
Copy link
Contributor Author

I understand that the windows builds are currently setup to use checked-in vcproj files. I personally would like to be able to build antlr with cmake on windows and non-windows to keep our build definition simpler and not have to follow different paths for building on different platforms.

I have tried to add the MSVC compiler flags corresponding to the gcc flags where relevant, and tried to add most of the settings i could find in the project file. I think it would be cool to move away from checked in project files; imho, it is easier to maintain and automate. It also enables the install target, which is pretty cool. :)

@matthauck
Copy link
Contributor Author

(Note: contributors.txt signed in #1973. I can add that here too if needed)

Since the install target install static and shared libs into same
folder, and because on windows a shared lib also outputs a shared
.lib file to link against, need to make sure the static/shared
.lib files do not clobber each other.
@mike-lischke
Copy link
Member

mike-lischke commented Jul 29, 2017

I dare to disagree. Using cmake in addition to checked-in VS project files is acceptable (even though I still find this rather strange), however the project files must stay in the repo. You always need them (to build the binaries). Why would you want to generate them first? And you would force people to use cmake even though it's not needed at all in this case.

Unfortunately, I cannot review this patch. I don't use cmake.

@matthauck
Copy link
Contributor Author

I think the reasons for using cmake instead of checked-in project files are:

  • Ability to use the install target instead of manually copying files around
  • Easier to automate
  • Ability to unify configuration of source files across all platforms, and even MSVC settings across versions.
  • Frees up the antlr project from creating and clicking around in MSVC UI whenever a new compiler needs to be supported (or going back and updating things w/ old MSVC versions when bugs are found).

CMake is a great tool and having people install it before they build antlr doesn't seem like a burdensome requirement to me, and it makes the project easier to build, imo.

@parrt parrt added this to the 4.7.1 milestone Oct 21, 2017
@parrt parrt merged commit b8fd547 into antlr:master Oct 21, 2017
@matthauck matthauck deleted the cmake-windows branch July 16, 2019 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants