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
491360b8
Commit
491360b8
authored
Oct 20, 2017
by
Yangqing Jia
Committed by
Dominic Hamon
Oct 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option to install benchmark (#463)
* Add option to install benchmark * Change to BENCHMARK_ENABLE_INSTALL per @dominichamon
parent
25acf220
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
23 deletions
+26
-23
CMakeLists.txt
CMakeLists.txt
+2
-1
CMakeLists.txt
src/CMakeLists.txt
+24
-22
No files found.
CMakeLists.txt
View file @
491360b8
...
@@ -15,7 +15,8 @@ option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." ON)
...
@@ -15,7 +15,8 @@ option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." ON)
option
(
BENCHMARK_ENABLE_EXCEPTIONS
"Enable the use of exceptions in the benchmark library."
ON
)
option
(
BENCHMARK_ENABLE_EXCEPTIONS
"Enable the use of exceptions in the benchmark library."
ON
)
option
(
BENCHMARK_ENABLE_LTO
"Enable link time optimisation of the benchmark library."
OFF
)
option
(
BENCHMARK_ENABLE_LTO
"Enable link time optimisation of the benchmark library."
OFF
)
option
(
BENCHMARK_USE_LIBCXX
"Build and test using libc++ as the standard library."
OFF
)
option
(
BENCHMARK_USE_LIBCXX
"Build and test using libc++ as the standard library."
OFF
)
option
(
BENCHMARK_BUILD_32_BITS
"Build a 32 bit version of the library"
OFF
)
option
(
BENCHMARK_BUILD_32_BITS
"Build a 32 bit version of the library."
OFF
)
option
(
BENCHMARK_ENABLE_INSTALL
"Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)"
ON
)
# 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"
)
...
...
src/CMakeLists.txt
View file @
491360b8
...
@@ -54,25 +54,27 @@ write_basic_package_version_file(
...
@@ -54,25 +54,27 @@ write_basic_package_version_file(
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/cmake/Config.cmake.in"
"
${
project_config
}
"
@ONLY
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/cmake/Config.cmake.in"
"
${
project_config
}
"
@ONLY
)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
if
(
BENCHMARK_ENABLE_INSTALL
)
install
(
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
TARGETS benchmark
install
(
EXPORT
${
targets_export_name
}
TARGETS benchmark
ARCHIVE DESTINATION
${
lib_install_dir
}
EXPORT
${
targets_export_name
}
LIBRARY DESTINATION
${
lib_install_dir
}
ARCHIVE DESTINATION
${
lib_install_dir
}
RUNTIME DESTINATION
${
bin_install_dir
}
LIBRARY DESTINATION
${
lib_install_dir
}
INCLUDES DESTINATION
${
include_install_dir
}
)
RUNTIME DESTINATION
${
bin_install_dir
}
INCLUDES DESTINATION
${
include_install_dir
}
)
install
(
DIRECTORY
"
${
PROJECT_SOURCE_DIR
}
/include/benchmark"
install
(
DESTINATION
${
include_install_dir
}
DIRECTORY
"
${
PROJECT_SOURCE_DIR
}
/include/benchmark"
FILES_MATCHING PATTERN
"*.*h"
)
DESTINATION
${
include_install_dir
}
FILES_MATCHING PATTERN
"*.*h"
)
install
(
FILES
"
${
project_config
}
"
"
${
version_config
}
"
install
(
DESTINATION
"
${
config_install_dir
}
"
)
FILES
"
${
project_config
}
"
"
${
version_config
}
"
DESTINATION
"
${
config_install_dir
}
"
)
install
(
EXPORT
"
${
targets_export_name
}
"
install
(
NAMESPACE
"
${
namespace
}
"
EXPORT
"
${
targets_export_name
}
"
DESTINATION
"
${
config_install_dir
}
"
)
NAMESPACE
"
${
namespace
}
"
DESTINATION
"
${
config_install_dir
}
"
)
endif
()
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