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
3ae2a299
Commit
3ae2a299
authored
Feb 11, 2015
by
Andrii Senkovych
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport compiler options from premake configuration. Refs #240.
parent
9122a78a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
CMakeLists.txt
CMakeLists.txt
+7
-2
CMakeLists.txt
example/CMakeLists.txt
+8
-0
CMakeLists.txt
test/unittest/CMakeLists.txt
+8
-0
No files found.
CMakeLists.txt
View file @
3ae2a299
...
@@ -23,6 +23,13 @@ if(RAPIDJSON_HAS_STDSTRING)
...
@@ -23,6 +23,13 @@ if(RAPIDJSON_HAS_STDSTRING)
add_definitions
(
-DRAPIDJSON_HAS_STDSTRING
)
add_definitions
(
-DRAPIDJSON_HAS_STDSTRING
)
endif
()
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
(
_CRT_SECURE_NO_WARNINGS
)
endif
()
#add extra search paths for libraries and includes
#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"
)
SET
(
INCLUDE_INSTALL_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/include"
CACHE PATH
"The directory the headers are installed in"
)
...
@@ -36,9 +43,7 @@ ELSEIF(WIN32)
...
@@ -36,9 +43,7 @@ ELSEIF(WIN32)
ENDIF
()
ENDIF
()
SET
(
CMAKE_INSTALL_DIR
"
${
_CMAKE_INSTALL_DIR
}
"
CACHE PATH
"The directory cmake fiels are installed in"
)
SET
(
CMAKE_INSTALL_DIR
"
${
_CMAKE_INSTALL_DIR
}
"
CACHE PATH
"The directory cmake fiels are installed in"
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/include
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/include
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
RAPIDJSON_CXX_FLAGS
}
"
)
if
(
RAPIDJSON_BUILD_DOC
)
if
(
RAPIDJSON_BUILD_DOC
)
add_subdirectory
(
doc
)
add_subdirectory
(
doc
)
...
...
example/CMakeLists.txt
View file @
3ae2a299
...
@@ -14,6 +14,14 @@ set(EXAMPLES
...
@@ -14,6 +14,14 @@ set(EXAMPLES
simplewriter
simplewriter
tutorial
)
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
(
_CRT_SECURE_NO_WARNINGS
)
endif
()
foreach
(
example
${
EXAMPLES
}
)
foreach
(
example
${
EXAMPLES
}
)
add_executable
(
${
example
}
${
example
}
/
${
example
}
.cpp
)
add_executable
(
${
example
}
${
example
}
/
${
example
}
.cpp
)
endforeach
()
endforeach
()
...
...
test/unittest/CMakeLists.txt
View file @
3ae2a299
...
@@ -13,6 +13,14 @@ set(UNITTEST_SOURCES
...
@@ -13,6 +13,14 @@ set(UNITTEST_SOURCES
valuetest.cpp
valuetest.cpp
writertest.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
(
_CRT_SECURE_NO_WARNINGS
)
endif
()
add_library
(
namespacetest STATIC namespacetest.cpp
)
add_library
(
namespacetest STATIC namespacetest.cpp
)
add_executable
(
unittest
${
UNITTEST_SOURCES
}
)
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