Skip to content

Fix CMake syntax for appending to CMAKE_<LANG>_FLAGS with Intel compilers#4784

Open
harmenwierenga wants to merge 1 commit into
OSGeo:masterfrom
harmenwierenga:fix/cmake-lang-flags-string-append
Open

Fix CMake syntax for appending to CMAKE_<LANG>_FLAGS with Intel compilers#4784
harmenwierenga wants to merge 1 commit into
OSGeo:masterfrom
harmenwierenga:fix/cmake-lang-flags-string-append

Conversation

@harmenwierenga
Copy link
Copy Markdown

  • AI (Copilot or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated.
  • Closes #xxxx
  • Tests added
  • Added clear title that can be used to generate release notes

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

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.

1 participant