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

Fix compilation when path includes spaces #561

Merged
merged 1 commit into from
Feb 21, 2017

Conversation

joostrijneveld
Copy link
Contributor

Currently compilation of release would break when the path to stlink included spaces. There seemed to be no proper way to fix this by escaping within COMPILE_FLAGS, but since CMake 3.0 there is a COMPILE_DEFINITIONS property that handles escaping itself.

@xor-gate
Copy link
Member

xor-gate commented Feb 21, 2017

Hi @joostrijneveld, I understand your concern about this problem. Only I want people give the room to use older cmake versions. CMake 3.0 is released 3 years ago.

https://blog.kitware.com/cmake-3-0-0-available-for-download/

@joostrijneveld
Copy link
Contributor Author

I see your concern.. It's not entirely clear to me if this strictly requires CMake 3.0 though, as I'm now also finding references to this in older CMake documentation. I'll spin up a VM and give it a test..

@xor-gate
Copy link
Member

Most systems come with CMake 2.6 or higher. Ubuntu LTS comes with 2.6, Debian oldstable with 2.8, Debian stable with 3.0.2. And I want also support older BSDs.

@joostrijneveld
Copy link
Contributor Author

I didn't realise 3.0 was that recent, but it appear it's not a problem after all. COMPILE_DEFINITIONS works just fine on older CMake; it's just that alternative COMPILE_DEFINITIONS_<CONFIG> was deprecated in favour of it.

To verify, I spun up a fresh Debian Wheezy VM, installed the requirements, and compiled from this branch. I'll amend my commit accordingly.

@xor-gate
Copy link
Member

Great! This looks good.

@xor-gate xor-gate merged commit 28a1559 into stlink-org:master Feb 21, 2017
@xor-gate xor-gate added this to the v1.3.1 milestone Mar 1, 2017
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants