Skip to content

Fix CMAKE_C_VISIBILITY_PRESET for cmake versions greater than 1.8 #1

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

Merged
merged 1 commit into from
Nov 9, 2016
Merged

Conversation

hughbe
Copy link

@hughbe hughbe commented Nov 9, 2016

This lets us build swift-cmark on Windows, using clang-cl

This was an oversight: CMAKE_C_VISIBILITY_PRESET is only available on CMAKE 1.8 or greater. However, the current check doesn't work for a version such as CMAKE 3.6.2, for example.

If this is not added, we get an error: error: unknown argument: '-fvisibility=hidden'

mkdir "C:/Users/hughb/Documents/GitHub/my-swift/build/Ninja-DebugAssert/cmark-windows-amd64"
pushd "C:/Users/hughb/Documents/GitHub/my-swift/build/Ninja-DebugAssert/cmark-windows-amd64"
cmake -G Ninja -DCMAKE_C_COMPILER="C:/Program Files/LLVM/msbuild-bin/cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/msbuild-bin/cl.exe" -DCMAKE_CXX_FLAGS="-Xclang -std=c++14" "C:/Users/hughb/Documents/GitHub/my-swift/cmark"
popd
cmake --build "C:/Users/hughb/Documents/GitHub/my-swift/build/Ninja-DebugAssert/cmark-windows-amd64/" -- -j6 all

@jrose-apple could you help triage this :)

@hughbe
Copy link
Author

hughbe commented Nov 9, 2016

Upstream pull: commonmark#162

@jrose-apple
Copy link

Oof. How did we get that wrong? Thanks, @hughbe. Let's see, do we have testing for CMark?

@swift-ci Please test

@jrose-apple
Copy link

I guess not. Let's wait a day to see if there's any feedback from upstream, and then I'll merge.

@jrose-apple
Copy link

Heh. Merged almost immediately upstream, so I'll merge here too. (We should probably consider pulling from upstream soon.)

@jrose-apple jrose-apple merged commit 912d9d4 into swiftlang:master Nov 9, 2016
@hughbe
Copy link
Author

hughbe commented Nov 9, 2016

The upstream PR passed the CI but I'm not sure how similar this fork is to upstream. I'll see if I can pull upstream later tonight and send a PR for that

Copy link

@Nader822 Nader822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

H

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.

3 participants