Skip to content

Commit

Permalink
Issue #15 Added install targets for the examples and unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Dec 26, 2013
1 parent de9bcbe commit 1991850
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions example/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ set_property(
PROPERTY COMPILE_DEFINITIONS PCP_CPP_NO_BOOST
)

install(
TARGETS "pmda${PROJECT_NAME}" "pmda${PROJECT_NAME}-noboost"
RUNTIME DESTINATION bin
)

install(
FILES "${PROJECT_NAME}.cpp"
DESTINATION share/doc/pcp-cpp
)

# Enable (and stop on) compiler warnings.
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wall HAVE_WALL)
Expand Down
10 changes: 10 additions & 0 deletions example/simplecpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ set_property(
PROPERTY COMPILE_DEFINITIONS PCP_CPP_NO_BOOST
)

install(
TARGETS "pmda${PROJECT_NAME}" "pmda${PROJECT_NAME}-noboost"
RUNTIME DESTINATION bin
)

install(
FILES "${PROJECT_NAME}.cpp"
DESTINATION share/doc/pcp-cpp
)

# Enable (and stop on) compiler warnings.
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wall HAVE_WALL)
Expand Down
10 changes: 10 additions & 0 deletions example/trivial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ set_property(
PROPERTY COMPILE_DEFINITIONS PCP_CPP_NO_BOOST
)

install(
TARGETS "pmda${PROJECT_NAME}" "pmda${PROJECT_NAME}-noboost"
RUNTIME DESTINATION bin
)

install(
FILES "${PROJECT_NAME}.cpp"
DESTINATION share/doc/pcp-cpp
)

# Enable (and stop on) compiler warnings.
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wall HAVE_WALL)
Expand Down
5 changes: 5 additions & 0 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,8 @@ target_link_libraries(

# Add a custom "check" target a la GNU's Standard Targets for Users.
add_custom_target(check COMMAND test DEPENDS test)

install(
TARGETS test
DESTINATION bin/pcp-pmda-cpp
)

0 comments on commit 1991850

Please sign in to comment.