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
e38fde64
Commit
e38fde64
authored
Apr 23, 2014
by
Chris Kennelly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup targets from each directory, rather than the top-level.
parent
9b5ece6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
17 deletions
+20
-17
CMakeLists.txt
CMakeLists.txt
+3
-17
CMakeLists.txt
src/CMakeLists.txt
+14
-0
CMakeLists.txt
test/CMakeLists.txt
+3
-0
No files found.
CMakeLists.txt
View file @
e38fde64
...
...
@@ -30,19 +30,6 @@ include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories
(
${
PROJECT_SOURCE_DIR
}
/src
)
# Build the targets
FILE
(
GLOB SOURCE_FILES
"src/*.cc"
)
add_library
(
benchmark STATIC
${
SOURCE_FILES
}
)
add_executable
(
benchmark_test test/benchmark_test.cc
)
target_link_libraries
(
benchmark_test benchmark
${
CMAKE_THREAD_LIBS_INIT
}
)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
INSTALL
(
TARGETS benchmark
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library
)
INSTALL
(
DIRECTORY
"
${
PROJECT_SOURCE_DIR
}
/include/benchmark"
DESTINATION include
FILES_MATCHING PATTERN
"*.*h"
)
\ No newline at end of file
enable_testing
()
add_subdirectory
(
src
)
add_subdirectory
(
test
)
src/CMakeLists.txt
0 → 100644
View file @
e38fde64
set
(
SOURCE_FILES
"benchmark.cc"
"colorprint.cc"
"commandlineflags.cc"
"sleep.cc"
"sysinfo.cc"
"walltime.cc"
)
add_library
(
benchmark STATIC
${
SOURCE_FILES
}
)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
install
(
TARGETS benchmark
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library
)
install
(
DIRECTORY
"
${
PROJECT_SOURCE_DIR
}
/include/benchmark"
DESTINATION include
FILES_MATCHING PATTERN
"*.*h"
)
test/CMakeLists.txt
0 → 100644
View file @
e38fde64
# Demonstration executable
add_executable
(
benchmark_test benchmark_test.cc
)
target_link_libraries
(
benchmark_test benchmark
${
CMAKE_THREAD_LIBS_INIT
}
)
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