rpavlik/cmake-modules

find_package(Markdown) finding some file on Windows but not able to execute it

Closed this issue · 3 comments

cc @russell-taylor who knows more about the circumstances since it's his machine.

Bug is presumably in https://github.com/rpavlik/cmake-modules/blob/master/FindMarkdown.cmake - perhaps there are specific executables to exclude, or a test we can do to determine if a given executable actually is a markdown parser at config time before we try to use it.

Here was the error message he got:

2>  Converting Markdown CONTRIBUTING.md to HTML in C:/tmp/vs2013_64/OSVR-Core/CONTRIBUTING.html...
2>  Access is denied.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 5.

Russ, what's the value of MARKDOWN_EXECUTABLE in that config?

The executable is F:/taylorr/Personal/Work/consulting/Sensics/OSVR/src/OSVR-Core/vendor/discount-windows-bins/markdown.exe and I get "access denied" when I try to run it in CMD or in Cygwin. Cygwin has it as readable and executable by all with 'ls -l'. When I try to double-click, it also says I cannot access the file. The Windows security tab shows me without execute permission on the file (though I have read access).

I did the git clone in Cygwin, which may explain the permissions problems. I looked at the file after a fresh clone and that's how it shows up out of the box.

When I change the permissions on that file to allow everyone to execute it (using right-click Windows fu), everything works fine.

When I used Git-bash to clone, I have execute permission out of the box.

Ah, you use git in cygwin. Explains a few quirks I've seen in commits. :) didn't know Windows had an execute bit, but glad we figured this one out