Removed samples building from 'all' target
This commit is contained in:
parent
e5ec792907
commit
343678a020
5 changed files with 14 additions and 5 deletions
|
@ -27,6 +27,7 @@ script:
|
|||
- cd build
|
||||
- cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$HOME -DCMAKE_INSTALL_PREFIX=criterion-${TRAVIS_TAG} ..
|
||||
- make
|
||||
- make criterion_tests
|
||||
- make test
|
||||
after_success:
|
||||
- make coveralls
|
||||
|
|
|
@ -167,7 +167,8 @@ install(TARGETS criterion
|
|||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
add_custom_target(criterion_tests)
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(samples)
|
||||
add_subdirectory(test)
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ before_deploy:
|
|||
Push-AppveyorArtifact "../$archive.tar.bz2"
|
||||
|
||||
test_script:
|
||||
- cmake --build . --target criterion_tests
|
||||
- ps: try { ctest } catch { type Testing/Temporary/LastTest.log }
|
||||
|
||||
#after_test:
|
||||
|
|
|
@ -40,9 +40,13 @@ if (HAVE_PCRE)
|
|||
set(SCRIPTS ${SCRIPTS} pattern)
|
||||
endif ()
|
||||
|
||||
add_custom_target(criterion_samples)
|
||||
add_dependencies(criterion_tests criterion_samples)
|
||||
|
||||
macro(add_samples DIR_ SAMPLES_)
|
||||
foreach(sample ${SAMPLES_})
|
||||
add_executable(${sample}.bin ${sample})
|
||||
add_executable(${sample}.bin EXCLUDE_FROM_ALL ${sample})
|
||||
add_dependencies(criterion_samples ${sample}.bin)
|
||||
target_link_libraries(${sample}.bin criterion)
|
||||
add_test(${sample} ${sample}.bin)
|
||||
set_property(TEST ${sample} PROPERTY
|
||||
|
|
|
@ -8,7 +8,9 @@ set(TEST_SOURCES
|
|||
ordered-set.c
|
||||
)
|
||||
|
||||
add_executable(test_criterion ${TEST_SOURCES})
|
||||
target_link_libraries(test_criterion criterion)
|
||||
add_executable(criterion_unit_tests EXCLUDE_FROM_ALL ${TEST_SOURCES})
|
||||
target_link_libraries(criterion_unit_tests criterion)
|
||||
|
||||
add_test(test_criterion test_criterion)
|
||||
add_dependencies(criterion_tests criterion_unit_tests)
|
||||
|
||||
add_test(criterion_unit_tests criterion_unit_tests)
|
||||
|
|
Loading…
Add table
Reference in a new issue