Fix CMake syntax for appending to CMAKE_<LANG>_FLAGS with Intel compilers#4784
Open
harmenwierenga wants to merge 1 commit into
Open
Fix CMake syntax for appending to CMAKE_<LANG>_FLAGS with Intel compilers#4784harmenwierenga wants to merge 1 commit into
harmenwierenga wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran into an issue where PROJ would not build on windows using the intel compilers, because the compiler would receive flags with wrong syntax. The issue is that CMAKE__FLAGS are: "a command-line string fragment. Therefore, multiple options should be separated by spaces, and options with spaces should be quoted." The current CMake commands perform a list append, which adds a semicolon in the string if CMAKE_C_FLAGS already contained something. I use string APPEND now, which was added in CMake 3.4, and you require version 3.16.
I used Copilot to find the bug, I fixed it myself. My employer Deltares understands that this will be licensed under an MIT style license. Please let me know if I have to add a linked issue