GithubHelp home page GithubHelp logo

Comments (8)

jgm avatar jgm commented on May 24, 2024

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.

bohrshaw avatar bohrshaw commented on May 24, 2024

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.

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.

jgm avatar jgm commented on May 24, 2024

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.

tin-pot avatar tin-pot commented on May 24, 2024

@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's main 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.

jgm avatar jgm commented on May 24, 2024

@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.

tin-pot avatar tin-pot commented on May 24, 2024

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.

jgm avatar jgm commented on May 24, 2024

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

  1. #85 (comment)

from cmark.

tin-pot avatar tin-pot commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.