Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
bb23a9b9
Commit
bb23a9b9
authored
Apr 30, 2015
by
Matt Clarkson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile with link time optimisation
Can provide speed improvements
parent
7418bbbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
CMakeLists.txt
CMakeLists.txt
+17
-0
No files found.
CMakeLists.txt
View file @
bb23a9b9
...
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 2.8.11)
...
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 2.8.11)
project
(
benchmark
)
project
(
benchmark
)
option
(
BENCHMARK_ENABLE_TESTING
"Enable testing of the benchmark library."
ON
)
option
(
BENCHMARK_ENABLE_TESTING
"Enable testing of the benchmark library."
ON
)
option
(
BENCHMARK_ENABLE_LTO
"Enable link time optimisation of the benchmark library."
OFF
)
# Make sure we can import out CMake functions
# Make sure we can import out CMake functions
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
...
@@ -41,9 +42,25 @@ add_cxx_compiler_flag(-pedantic-errors)
...
@@ -41,9 +42,25 @@ add_cxx_compiler_flag(-pedantic-errors)
add_cxx_compiler_flag
(
-Wshorten-64-to-32
)
add_cxx_compiler_flag
(
-Wshorten-64-to-32
)
add_cxx_compiler_flag
(
-Wfloat-equal
)
add_cxx_compiler_flag
(
-Wfloat-equal
)
add_cxx_compiler_flag
(
-Wzero-as-null-pointer-constant
)
add_cxx_compiler_flag
(
-Wzero-as-null-pointer-constant
)
# Release flags
# Release flags
add_cxx_compiler_flag
(
-fno-strict-aliasing RELEASE
)
add_cxx_compiler_flag
(
-fno-strict-aliasing RELEASE
)
# Link time optimisation
if
(
BENCHMARK_ENABLE_LTO
)
add_cxx_compiler_flag
(
-flto
)
if
(
"
${
CMAKE_C_COMPILER_ID
}
"
STREQUAL
"GNU"
)
find_program
(
GCC_AR gcc-ar
)
if
(
GCC_AR
)
set
(
CMAKE_AR
${
GCC_AR
}
)
endif
()
find_program
(
GCC_RANLIB gcc-ranlib
)
if
(
GCC_RANLIB
)
set
(
CMAKE_RANLIB
${
GCC_RANLIB
}
)
endif
()
endif
()
endif
()
add_cxx_compiler_flag
(
-Wthread-safety
)
add_cxx_compiler_flag
(
-Wthread-safety
)
if
(
HAVE_WTHREAD_SAFETY
)
if
(
HAVE_WTHREAD_SAFETY
)
add_definitions
(
-DHAVE_WTHREAD_SAFETY
)
add_definitions
(
-DHAVE_WTHREAD_SAFETY
)
...
...
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