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
84c56130
Commit
84c56130
authored
Dec 31, 2015
by
Omer Katz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust CMakeLists.txt files to use ccache when it's available.
parent
3186e31b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
CMakeLists.txt
CMakeLists.txt
+6
-0
CMakeLists.txt
test/perftest/CMakeLists.txt
+6
-0
CMakeLists.txt
test/unittest/CMakeLists.txt
+6
-0
No files found.
CMakeLists.txt
View file @
84c56130
...
...
@@ -25,6 +25,12 @@ if(RAPIDJSON_HAS_STDSTRING)
add_definitions
(
-DRAPIDJSON_HAS_STDSTRING
)
endif
()
find_program
(
CCACHE_FOUND ccache
)
if
(
CCACHE_FOUND
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_LINK ccache
)
endif
(
CCACHE_FOUND
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-march=native -Wall -Wextra -Werror"
)
elseif
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
...
...
test/perftest/CMakeLists.txt
View file @
84c56130
...
...
@@ -9,6 +9,12 @@ target_link_libraries(perftest ${TEST_LIBRARIES})
add_dependencies
(
tests perftest
)
find_program
(
CCACHE_FOUND ccache
)
if
(
CCACHE_FOUND
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_LINK ccache
)
endif
(
CCACHE_FOUND
)
IF
(
NOT
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
))
add_test
(
NAME perftest
COMMAND
${
CMAKE_RUNTIME_OUTPUT_DIRECTORY
}
/perftest
...
...
test/unittest/CMakeLists.txt
View file @
84c56130
...
...
@@ -18,6 +18,12 @@ set(UNITTEST_SOURCES
valuetest.cpp
writertest.cpp
)
find_program
(
CCACHE_FOUND ccache
)
if
(
CCACHE_FOUND
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_LINK ccache
)
endif
(
CCACHE_FOUND
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal"
)
elseif
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
...
...
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