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

The real CMake support. #433

Closed
wants to merge 1 commit into from
Closed

The real CMake support. #433

wants to merge 1 commit into from

Conversation

unmanned-player
Copy link
Contributor

This patch provides a CMakeLists.txt file to build JSON-C library without relying on auto-tools support, making the build a bit more portable and cleaner.

It can detect headers and symbols and generate config.h header file based on those detections. It cannot yet handle ctest(1) as the testing itself depends on comparing the output against files. Testing would need some creative abuse of CMake :) Maybe a few patches later.

The patch has been tested on GCC 4.8.5 (Linux), GCC 7.2.0 (MinGW) and Microsoft Visual C++ 16.0 (2010?).

PS: This updates the patch provided in #432 by correcting AppVeyor file. Sorry for the inconvenience. I learnt what AppVeyor is and corrected the build automation too.

This patch provides a CMakeLists.txt file to build JSON-C library without relying on auto-tools support making the build a bit more portable and cleaner.

It can detect headers and symbols and generate config.h header file based on those detections. It cannot yet handle ctest(1) as the testing itself depends on comparing the output against files. Testing would need some creative abuse of CMake :)

The patch has been tested on GCC 4.8.5 (Linux), GCC 7.2.0 (MinGW) and Microsoft Visual C++ 16.0 (2010?).
@hawicz
Copy link
Member

hawicz commented Jul 23, 2018

Closed? Was there something still lacking?

@unmanned-player
Copy link
Contributor Author

Yeah, I thought it would be cool to have json-c compile with CMake alone without auto-tools.

It just won't build in Windows 7.1 SDK. Weird thing is it's picking the wrong compiler for testing includes/symbols but compiling with the right compiler and fails. See the build logs for details. When I ran manually on my VirtualBox (WinXP + SDK 7) it works smooth. AppVeyor doesn't seem to like it no matter how I modify the YAML.

If you're OK with it, I'd like to send the pull again but please note, it won't work with AppVeyor's weird tooling. I'm afraid of breaking your builds for my convenience. :(

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.

None yet

2 participants