Skip to content

Conversation

Leo1690
Copy link
Contributor

@Leo1690 Leo1690 commented Feb 17, 2023

Fix output dir for Visual Studio generator and for when ANTLR_BUILD_CPP_TESTS is not set

The antlr4 binaries are copied to ${ANTLR4_ROOT}/runtime/Cpp/dist only when ANTLR_BUILD_CPP_TESTS is set. However, when linking antlr4_shared to a new target, the target expects to find the . lib binary in ${ANTLR4_ROOT}/runtime/Cpp/dist/$(Configuration) for Visual Studio generator and it expects ${ANTLR4_ROOT}/runtime/Cpp/dist for other generator like Ninja. In any case, the binaries are always generated in ${ANTLR4_ROOT}/runtime/Cpp/runtime/$(Configuration) or ${ANTLR4_ROOT}/runtime/Cpp/runtime depending on the generator.

We can observe in this cmake file that the binaries are copied to dist only when ANTLR_BUILD_CPP_TESTS is set.

@parrt parrt changed the base branch from master to dev February 19, 2023 19:45
@parrt
Copy link
Member

parrt commented Feb 19, 2023

Was on master...i reset to dev but now it's pulling in weird stuff. maybe recreate?

…BUILD_CPP_TESTS is not set

Signed-off-by: Leonardo Sarmiento <[email protected]>
@Leo1690
Copy link
Contributor Author

Leo1690 commented Feb 20, 2023

Was on master...i reset to dev but now it's pulling in weird stuff. maybe recreate?

Sorry, I did not realize that. Now my patch is in dev.

@parrt parrt added this to the 4.12.1 milestone Mar 5, 2023
@parrt parrt merged commit e7f0eb9 into antlr:dev Mar 5, 2023
jimidle pushed a commit to jimidle/antlr4 that referenced this pull request Mar 28, 2023
…BUILD_CPP_TESTS is not set (antlr#4121)

Signed-off-by: Leonardo Sarmiento <[email protected]>
Co-authored-by: Leonardo Sarmiento <[email protected]>
Signed-off-by: Jim.Idle <[email protected]>
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.

2 participants