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

CMake Build(issue #82) #126

Closed
wants to merge 16 commits into from
Closed

Conversation

thebusytypist
Copy link
Contributor

This pull request is for CMake build system support in RapidJSON. (issue #82)

It includes build scripts for examples, unittests, and a CMake module of RapidJSON.

Usage:

  1. Run CMake client, then select the source path of RapidJSON and a build path(I suggest to use out-of-source build).
  2. Configure and set some variables.
    For some version of Visual C++ on Windows, you may need to check gtest_force_shared_crt to ensure projects are linked to same type of CRT(multi-threaded dynamic).
  3. Generate

Differences from current build system(premake):

  • Code Generation Settings
    In premake build scripts, project test and project example have inconsistent code generation settings. In project test SSE4.2(-msse4.2) is enabled only for gmake configuration.While in project example, SSE2(flags { "Optimize", "EnableSSE2" }) is enabled for release configuration.

    Currently I leave the SSE optimization settings unset for both project unittest and project example.

    This does not affect the intrinsic sets you use(which is controlled by CMake variable RapidJSON_SIMD_OPTIMIZATION).

  • Working Directory
    For Visual C++ you should set working directory manually because CMake cannot set it in an official documented way.

Please delay merging of this pull request. I have to test this on Xcode on a Mac OS X machine.

@miloyip
Copy link
Collaborator

miloyip commented Aug 31, 2014

Currently thirdparty/gtest is a Git submodule, is it possible to not adding gtest files in this pull request?

if(RapidJSON_ENDIANNESS STREQUAL "Little")
list(APPEND
RapidJSON_DEFINITIONS
"-DRAPIDJSON_ENDIAN=0")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use RAPIDJSON_BIGENDIAN and RAPIDJSON_LITTLEENDIAN instead of hard-coding 0 and 1.

@spl spl mentioned this pull request Nov 3, 2014
@jollyroger jollyroger mentioned this pull request Nov 5, 2014
7 tasks
@miloyip miloyip closed this Apr 8, 2015
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