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

Added CMAKE_EXE_LINKER_FLAGS to external projects. #437

Merged
merged 1 commit into from
Dec 27, 2021

Conversation

XaverKlemenschits
Copy link
Contributor

When using a compiler other than the system compiler, it is necessary to set some linker flags to the correct C++ standard libraries. This also applies to 3rd party dependencies.

Therefore, it is necessary to pass the linker flags through to the external projects.
With these changes, linker flags can be passed on the command line and all dependencies + bear will be linked correctly, e.g.:

cmake .. -DENABLE_UNIT_TESTS=OFF \
-DENABLE_FUNC_TESTS=OFF \
-DCMAKE_INSTALL_LIBDIR=lib64 \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath=$GCC_PATH/lib64"

works for CentOS/Redhat with a non-system compiler installed at $GCC_PATH.

@rizsotto rizsotto merged commit 68d96b1 into rizsotto:master Dec 27, 2021
@rizsotto
Copy link
Owner

Thanks @XaverKlemenschits ! Will be released as 3.0.18 soon.

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

Successfully merging this pull request may close these issues.

2 participants