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

Use target_link_options to pass linker options #103

Open
scheibel opened this issue Apr 26, 2019 · 0 comments
Open

Use target_link_options to pass linker options #103

scheibel opened this issue Apr 26, 2019 · 0 comments

Comments

@scheibel
Copy link
Member

As of CMake 3.13, the previously missing function target_link_options was introduced. I suggest to use this instead of target_link_libraries. The current implementation does not allow passing linker options for MSVC.

Details:
Options (and linker options, too) start with a front slash for MSVC (e.g., /LTCG). As we use target_link_libraries to pass this option to the linker, CMake assumes library names to link against and gracefully converts our Unix-encoded path separator to Windows-encoded path separators, resulting in \LTCG being passed to the linker.

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