Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
6c37f211
Commit
6c37f211
authored
Jan 20, 2016
by
Axel Huebl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMake: Test Counting
- automatically detect number of examples
parent
80a06745
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
CMakeLists.txt
+11
-5
No files found.
CMakeLists.txt
View file @
6c37f211
...
...
@@ -94,10 +94,7 @@ set(PYBIND11_HEADERS
include/pybind11/typeid.h
)
# Create the binding library
add_library
(
example SHARED
${
PYBIND11_HEADERS
}
example/example.cpp
set
(
PYBIND11_EXAMPLES
example/example1.cpp
example/example2.cpp
example/example3.cpp
...
...
@@ -112,6 +109,15 @@ add_library(example SHARED
example/example12.cpp
example/example13.cpp
)
set
(
PYBIND11_FIRSTEXAMPLE 1
)
list
(
LENGTH PYBIND11_EXAMPLES PYBIND11_LASTEXAMPLE
)
# Create the binding library
add_library
(
example SHARED
${
PYBIND11_HEADERS
}
example/example.cpp
${
PYBIND11_EXAMPLES
}
)
# Don't add a 'lib' prefix to the shared library
set_target_properties
(
example PROPERTIES PREFIX
""
)
...
...
@@ -181,7 +187,7 @@ endif()
enable_testing
()
set
(
RUN_TEST
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/example/run_test.py
)
foreach
(
i RANGE
1 13
)
foreach
(
i RANGE
${
PYBIND11_FIRSTEXAMPLE
}
${
PYBIND11_LASTEXAMPLE
}
)
add_test
(
NAME example
${
i
}
COMMAND
${
RUN_TEST
}
example
${
i
}
)
endforeach
()
...
...
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