Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
c14dff16
Commit
c14dff16
authored
Mar 10, 2015
by
Philipp A. Hartmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cmake-update' of @jollyroger (#244)
parents
c745c953
122170b3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
7 deletions
+30
-7
.gitignore
.gitignore
+2
-4
.travis.yml
.travis.yml
+1
-0
CMakeLists.txt
CMakeLists.txt
+7
-2
CMakeLists.txt
example/CMakeLists.txt
+8
-0
CMakeLists.txt
test/unittest/CMakeLists.txt
+12
-1
No files found.
.gitignore
View file @
c14dff16
...
...
@@ -2,10 +2,10 @@
!/bin/data
!/bin/encodings
!/bin/jsonchecker
/build
/doc/html
/doc/doxygen_*.db
/thirdparty/lib
/intermediate
*.a
# Temporary files created during CMake build
CMakeCache.txt
...
...
@@ -20,4 +20,3 @@ Testing
install_manifest.txt
Doxyfile
DartConfiguration.tcl
/build/*
\ No newline at end of file
.travis.yml
View file @
c14dff16
...
...
@@ -21,6 +21,7 @@ before_install:
install
:
true
before_script
:
-
sed -i 's/march=native/msse4.2/' CMakeLists.txt
-
mkdir build
-
>
(cd build && cmake
...
...
CMakeLists.txt
View file @
c14dff16
...
...
@@ -23,6 +23,13 @@ if(RAPIDJSON_HAS_STDSTRING)
add_definitions
(
-DRAPIDJSON_HAS_STDSTRING
)
endif
()
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-march=native -Wall -Wextra"
)
elseif
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-march=native -Wall -Wextra"
)
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"MSVC"
)
add_definitions
(
-D_CRT_SECURE_NO_WARNINGS=1
)
endif
()
#add extra search paths for libraries and includes
SET
(
INCLUDE_INSTALL_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/include"
CACHE PATH
"The directory the headers are installed in"
)
...
...
@@ -36,9 +43,7 @@ ELSEIF(WIN32)
ENDIF
()
SET
(
CMAKE_INSTALL_DIR
"
${
_CMAKE_INSTALL_DIR
}
"
CACHE PATH
"The directory cmake fiels are installed in"
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/include
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
RAPIDJSON_CXX_FLAGS
}
"
)
if
(
RAPIDJSON_BUILD_DOC
)
add_subdirectory
(
doc
)
...
...
example/CMakeLists.txt
View file @
c14dff16
...
...
@@ -14,6 +14,14 @@ set(EXAMPLES
simplewriter
tutorial
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Werror -Wall -Wextra -Weffc++ -Wswitch-default"
)
elseif
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Werror -Wall -Wextra -Weffc++ -Wswitch-default"
)
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"MSVC"
)
add_definitions
(
-D_CRT_SECURE_NO_WARNINGS=1
)
endif
()
foreach
(
example
${
EXAMPLES
}
)
add_executable
(
${
example
}
${
example
}
/
${
example
}
.cpp
)
endforeach
()
...
...
test/unittest/CMakeLists.txt
View file @
c14dff16
set
(
UNITTEST_SOURCES
bigintegertest.cpp
documenttest.cpp
encodedstreamtest.cpp
encodingstest.cpp
filestreamtest.cpp
jsoncheckertest.cpp
namespacetest.cpp
readertest.cpp
stringbuffertest.cpp
strtodtest.cpp
unittest.cpp
unittest.h
valuetest.cpp
writertest.cpp
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Werror -Weffc++ -Wswitch-default"
)
elseif
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Werror -Weffc++ -Wswitch-default"
)
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"MSVC"
)
add_definitions
(
-D_CRT_SECURE_NO_WARNINGS=1
)
endif
()
add_library
(
namespacetest STATIC namespacetest.cpp
)
add_executable
(
unittest
${
UNITTEST_SOURCES
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment