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
2b954213
Commit
2b954213
authored
Apr 03, 2015
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'geoffromer-cmake-patch'
parents
42d2b8d1
1e0ed3a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
CMakeLists.txt
CMakeLists.txt
+4
-1
CMakeLists.txt
src/CMakeLists.txt
+7
-6
No files found.
CMakeLists.txt
View file @
2b954213
cmake_minimum_required
(
VERSION 2.8
)
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
)
...
@@ -55,6 +55,9 @@ cxx_feature_check(GNU_POSIX_REGEX)
...
@@ -55,6 +55,9 @@ cxx_feature_check(GNU_POSIX_REGEX)
cxx_feature_check
(
POSIX_REGEX
)
cxx_feature_check
(
POSIX_REGEX
)
cxx_feature_check
(
STEADY_CLOCK
)
cxx_feature_check
(
STEADY_CLOCK
)
# Ensure we have pthreads
find_package
(
Threads REQUIRED
)
# Set up directories
# Set up directories
include_directories
(
${
PROJECT_SOURCE_DIR
}
/include
)
include_directories
(
${
PROJECT_SOURCE_DIR
}
/include
)
...
...
src/CMakeLists.txt
View file @
2b954213
...
@@ -19,23 +19,24 @@ endif()
...
@@ -19,23 +19,24 @@ endif()
add_library
(
benchmark
${
SOURCE_FILES
}
${
RE_FILES
}
)
add_library
(
benchmark
${
SOURCE_FILES
}
${
RE_FILES
}
)
# Link threading if building a shared library.
if
(
BUILD_SHARED_LIBS
)
find_package
(
Threads REQUIRED
)
target_link_libraries
(
benchmark
${
CMAKE_THREAD_LIBS_INIT
}
)
endif
()
set_target_properties
(
benchmark PROPERTIES
set_target_properties
(
benchmark PROPERTIES
OUTPUT_NAME
"benchmark"
OUTPUT_NAME
"benchmark"
VERSION
${
GENERIC_LIB_VERSION
}
VERSION
${
GENERIC_LIB_VERSION
}
SOVERSION
${
GENERIC_LIB_SOVERSION
}
SOVERSION
${
GENERIC_LIB_SOVERSION
}
)
)
# Link threads.
target_link_libraries
(
benchmark
${
CMAKE_THREAD_LIBS_INIT
}
)
# We need extra libraries on Windows
# We need extra libraries on Windows
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Windows"
)
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Windows"
)
target_link_libraries
(
benchmark Shlwapi
)
target_link_libraries
(
benchmark Shlwapi
)
endif
()
endif
()
# Expose public API
target_include_directories
(
benchmark PUBLIC
${
PROJECT_SOURCE_DIR
}
/include
)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
install
(
install
(
TARGETS benchmark
TARGETS benchmark
...
...
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