Comments (8)
The build script assumes that if there is a 'build'
directory, it has successfully populated with build
files by cmake.
If the build directory is created but (e.g.) cmake
isn't present, and so these files aren't created in
build, then the build script would fail. (This might
have happened if, for example, you ran the build
script, then it failed and you realized you needed
cmake, which you then installed.)
So, I suggest you try the following:
- delete the
build
subdirectory - revert all your edits to Makefile.nmake (reset the
repository to its original state) - Now try nmake again
nmake works just fine on our appveyor.com builds.
If this works, then I think all we need is a more
robust recovery from the case where build
exists
but wasn't fully or properly created.
from cmark.
If this works, then I think all we need is a more
robust recovery from the case wherebuild
exists
but wasn't fully or properly created.
Yes it works! In this case, we may create the build
directory after detecting cmake
; and prompt suggestions to delete the build
directory should the build
directory exist and the build failed.
By the way, in Powershell, we should run .\nmake
instead of nmake
, which could be mentioned in the README
.
from cmark.
I have made a small change which would have prevented the
problem you have. We now look for build/CMakeFiles rather
than just build. If build is created but cmake doesn't
exist, build/CMakeFiles will still be missing, so it will
try again.
A more ambitious change would be to explicitly check
for cmake before creating any directories. The main
Makefile does that, as you can see -- if you'd like to
port the logic over to Makefile.nmake, be my guest.
(I don't know what I'm doing when it comes to Windows
and don't have a Windows build environment to test in,
other than appveyor.)
from cmark.
@bohrshaw (and @jgm actually too ;-)
If you want, you could use (rsp pull from) my clone of cmark — it has VC++ 9.0 (Visual Studio 2008) project files in the VC9
directory. The project files build (without the use of cmake):
- A static library
libcmark.lib
, containing the translator code itself, - an executable
cmark.exe
, the reference implementation'smain
program, - an executable
cm2html.exe
, which generates HTML documents (hopefully conforming to ISO 15445:2000).
I had to "massage" the sources a bit so that a pre-C99, dumb compiler like VC 9.0 can grok them, but otherwise (as far as I can remember) the translator itself is not changed.
I have merged the jgm/cmark repository into my clone just two hours ago, so the CommonMark reference implementation parts should be up to date ...
The cm2html
HTML output contains the repository URL and commit ID in a <meta>
element like this:
<META name="GENERATOR"
content="cmark 0.22.0 ([email protected]:tin-pot/cmark.git a288e7744d90)">
These are created from macros REPOURL and GITIDENT, defined in the header files repourl.h
and gitident.h
, which in turn are generated in a pre-build action in the cm2html.vcproj
project setting, using git ls-remote
rsp git show-ref
(just in case you miss these two header files in the repository).
from cmark.
@tin-pot I'd rather stick with the current cmake build system. It should be capable of handling MSVC, and is regularly tested on Windows. If it's not able to handle certain older versions, let us know the details and we can improve the build system.
from cmark.
Well, I did not intend to replace the current build system using cmake
and scripts. Building directly from VS project files from inside the IDE works -- better -- for me, though.
If I remember correctly, I didn't even try to use the build system: Clobbering together some project files to build a "simple" command-line program seemed easier to me. And I had the wish to place the parser in a (static) library, which it isn't in the current build process (?) -- in order to build multiple tools using the same parser.
So I can't really say much about how well or bad the cmake
-based build works on Windows ... Let me know if me trying this out is important for you ...
The little stumbling blocks in the sources itself (regarding pre-C99 compilers) have been ironed out, thanks to your help, and that is what is important for me.
(Isn't cmake
even supposed to generate .vcproj
files and all, for MSVC? [Grabs documentation and exits ...])
from cmark.
Yes, cmake will generate VS project files.
Try (using a fresh checkout of cmark)
mkdir build
cd build
cmake -G "Visual Studio 9 2008" ..
and see what it gives you. I haven't tried this myself,
as I don't even have Visual Studio. But others have, I
believe -- though perhaps not for that old a version.
+++ Martin Hofmann [Oct 18 15 14:17 ]:
Well, I did not intend to replace the current build system using cmake
and scripts. Building directly from VS project files from inside the
IDE works -- better -- for me, though.If I remember correctly, I didn't even try to use the build system:
Clobbering together some project files to build a "simple" command-line
program seemed easier to me. And I had the wish to place the parser in
a (static) library, which it isn't in the current build process (?) --
in order to build multiple tools using the same parser.So I can't really say much about how well or bad the cmake-based build
works on Windows ... Let me know if me trying this out is important for
you ...The little stumbling blocks in the sources itself (regarding pre-C99
compilers) have been ironed out, thanks to your help, and that is what
is important for me.(Isn't cmake even supposed to generate .vcproj files and all, for MSVC?
[Grabs documentation and exits ...])—
Reply to this email directly or [1]view it on GitHub.References
from cmark.
Thanks, I'll try to use the cmake
build the other day (it's not that I hadn't used cmake
before, just not for my own stuff at home). And when I'm at it, I'm better going to attempt adding my clone's setup (one library, two executables) into a cloned CMakeLists.txt
definitions. May take some days, though.
I'll come back to you if I run into problems, ok?
from cmark.
Related Issues (20)
- please issue a formal release HOT 5
- Incorrect emphasis handling HOT 1
- Build fails on Debian Jessie HOT 19
- Quadratic behavior when parsing smart quotes
- Quadratic behavior when parsing emphasis
- Percent encoding of ~ HOT 3
- Parser incorrectly reading strong/emph in paragraphs that contain links. HOT 2
- Quadratic behavior in Commonmark renderer involving get_containing_block HOT 1
- Add additional C flags to your build (improving your code) HOT 5
- [Clang-tidy] Narrowing data types is implementation defined
- [Feature] Support math environment via $ and $$ like LaTeX HOT 2
- Line spacing of items in an unordered list is different if an item contains a fenced code block with an blank line before HOT 2
- API documentation is missing an explanation of CMARK_NODE_CUSTOM_BLOCK and CMARK_NODE_CUSTOM_INLINE HOT 2
- incorrect start_column & end_column HOT 1
- Odd parsing of `**A*B*C*` HOT 3
- Tracking backslash escapes?
- Latex export does not set the enumi counter correctly HOT 1
- H
- Parsing of "____a__!__!___" HOT 2
- Parsing of inline HTML declaration is stricter than spec
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmark.