-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #825 from CaseyCarter/build_fixes
Build improvements: * Use cmake 3.6.3 on Travis since `cmake_minimum_required(VERSION 3.6)` * Add a new `rv3-test` interface library to hold test-specific configuration * Define function `rv3_add_test(<name of test>, <name of executable>, <sources>...)` to simplify `CMakeLists.txt` * Ensure that the threading and coroutine checks happen before including subdirs (This isn't an improvement, it's a bug fix without which the `generator` test will never be built.)
- Loading branch information
Showing
13 changed files
with
251 additions
and
852 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,39 @@ | ||
include(../cmake/ranges_diagnostics.cmake) | ||
|
||
add_library(rv3-tests INTERFACE) | ||
target_link_libraries(rv3-tests INTERFACE range-v3) | ||
if(NOT RANGE_V3_TRY_THREAD) | ||
target_compile_definitions(rv3-tests INTERFACE "RANGES_CXX_THREAD=0") | ||
endif() | ||
if (RANGE_V3_HAS_FCOROUTINES_TS) | ||
target_compile_options(rv3-tests INTERFACE "-fcoroutines-ts") | ||
endif() | ||
|
||
function(rv3_add_test TESTNAME EXENAME FIRSTSOURCE) | ||
add_executable(${EXENAME} ${FIRSTSOURCE} ${ARGN}) | ||
target_link_libraries(${EXENAME} rv3-tests) | ||
add_test(${TESTNAME} ${EXENAME}) | ||
endfunction(rv3_add_test) | ||
|
||
add_subdirectory(action) | ||
add_subdirectory(algorithm) | ||
add_subdirectory(numeric) | ||
add_subdirectory(utility) | ||
add_subdirectory(view) | ||
add_subdirectory(experimental) | ||
|
||
add_executable(config config.cpp) | ||
target_link_libraries(config range-v3) | ||
add_test(test.config config) | ||
|
||
add_executable(container_conversion container_conversion.cpp) | ||
target_link_libraries(container_conversion range-v3) | ||
add_test(test.container_conversion container_conversion) | ||
|
||
add_executable(constexpr_core constexpr_core.cpp) | ||
target_link_libraries(constexpr_core range-v3) | ||
add_test(test.constexpr_core constexpr_core) | ||
|
||
add_executable(view_facade view_facade.cpp) | ||
target_link_libraries(view_facade range-v3) | ||
add_test(test.view_facade view_facade) | ||
|
||
add_executable(view_adaptor view_adaptor.cpp) | ||
target_link_libraries(view_adaptor range-v3) | ||
add_test(test.view_adaptor view_adaptor) | ||
|
||
add_executable(index index.cpp) | ||
target_link_libraries(index range-v3) | ||
add_test(test.index index) | ||
|
||
add_executable(iterator_range iterator_range.cpp) | ||
target_link_libraries(iterator_range range-v3) | ||
add_test(test.iterator_range iterator_range) | ||
|
||
add_executable(multiple multiple1.cpp multiple2.cpp) | ||
target_link_libraries(multiple range-v3) | ||
add_test(test.multiple multiple) | ||
|
||
add_executable(distance distance.cpp) | ||
target_link_libraries(distance range-v3) | ||
add_test(test.distance distance) | ||
|
||
add_executable(to_container to_container.cpp) | ||
target_link_libraries(to_container range-v3) | ||
add_test(test.to_container to_container) | ||
|
||
add_executable(getlines getlines.cpp) | ||
target_link_libraries(getlines range-v3) | ||
add_test(test.getlines getlines) | ||
|
||
add_executable(istream_range istream_range.cpp) | ||
target_link_libraries(istream_range range-v3) | ||
add_test(test.istream_range istream_range) | ||
|
||
add_executable(bug474 bug474.cpp) | ||
target_link_libraries(bug474 range-v3) | ||
add_test(test.bug474 bug474) | ||
|
||
add_executable(bug566 bug566.cpp) | ||
target_link_libraries(bug566 range-v3) | ||
add_test(test.bug566 bug566) | ||
|
||
add_executable(span span.cpp) | ||
target_link_libraries(span range-v3) | ||
add_test(test.span span) | ||
rv3_add_test(test.config config config.cpp) | ||
rv3_add_test(test.container_conversion container_conversion container_conversion.cpp) | ||
rv3_add_test(test.constexpr_core constexpr_core constexpr_core.cpp) | ||
rv3_add_test(test.view_facade view_facade view_facade.cpp) | ||
rv3_add_test(test.view_adaptor view_adaptor view_adaptor.cpp) | ||
rv3_add_test(test.index index index.cpp) | ||
rv3_add_test(test.iterator_range iterator_range iterator_range.cpp) | ||
rv3_add_test(test.multiple multiple multiple1.cpp multiple2.cpp) | ||
rv3_add_test(test.distance distance distance.cpp) | ||
rv3_add_test(test.to_container to_container to_container.cpp) | ||
rv3_add_test(test.getlines getlines getlines.cpp) | ||
rv3_add_test(test.istream_range istream_range istream_range.cpp) | ||
rv3_add_test(test.bug474 bug474 bug474.cpp) | ||
rv3_add_test(test.bug566 bug566 bug566.cpp) | ||
rv3_add_test(test.span span span.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,19 @@ | ||
add_executable(act.concepts cont_concepts.cpp) | ||
target_link_libraries(act.concepts range-v3) | ||
add_test(test.act.concepts act.concepts) | ||
|
||
add_executable(act.drop drop.cpp) | ||
target_link_libraries(act.drop range-v3) | ||
add_test(test.act.drop act.drop) | ||
|
||
add_executable(act.drop_while drop_while.cpp) | ||
target_link_libraries(act.drop_while range-v3) | ||
add_test(test.act.drop_while act.drop_while) | ||
|
||
add_executable(act.insert insert.cpp) | ||
target_link_libraries(act.insert range-v3) | ||
add_test(test.act.insert act.insert) | ||
|
||
add_executable(act.join join.cpp) | ||
target_link_libraries(act.join range-v3) | ||
add_test(test.act.join act.join) | ||
|
||
add_executable(act.push_front push_front.cpp) | ||
target_link_libraries(act.push_front range-v3) | ||
add_test(test.act.push_front act.push_front) | ||
|
||
add_executable(act.push_back push_back.cpp) | ||
target_link_libraries(act.push_back range-v3) | ||
add_test(test.act.push_back act.push_back) | ||
|
||
add_executable(act.remove_if remove_if.cpp) | ||
target_link_libraries(act.remove_if range-v3) | ||
add_test(test.act.remove_if act.remove_if) | ||
|
||
add_executable(act.reverse reverse.cpp) | ||
target_link_libraries(act.reverse range-v3) | ||
add_test(test.act.reverse act.reverse) | ||
|
||
add_executable(act.shuffle shuffle.cpp) | ||
target_link_libraries(act.shuffle range-v3) | ||
add_test(test.act.shuffle act.shuffle) | ||
|
||
add_executable(act.slice slice.cpp) | ||
target_link_libraries(act.slice range-v3) | ||
add_test(test.act.slice act.slice) | ||
|
||
add_executable(act.sort sort.cpp) | ||
target_link_libraries(act.sort range-v3) | ||
add_test(test.act.sort act.sort) | ||
|
||
add_executable(act.split split.cpp) | ||
target_link_libraries(act.split range-v3) | ||
add_test(test.act.split act.split) | ||
|
||
add_executable(act.stable_sort stable_sort.cpp) | ||
target_link_libraries(act.stable_sort range-v3) | ||
add_test(test.act.stable_sort act.stable_sort) | ||
|
||
add_executable(act.stride stride.cpp) | ||
target_link_libraries(act.stride range-v3) | ||
add_test(test.act.stride act.stride) | ||
|
||
add_executable(act.take take.cpp) | ||
target_link_libraries(act.take range-v3) | ||
add_test(test.act.take act.take) | ||
|
||
add_executable(act.take_while take_while.cpp) | ||
target_link_libraries(act.take_while range-v3) | ||
add_test(test.act.take_while act.take_while) | ||
|
||
add_executable(act.transform transform.cpp) | ||
target_link_libraries(act.transform range-v3) | ||
add_test(test.act.transform act.transform) | ||
|
||
add_executable(act.unique unique.cpp) | ||
target_link_libraries(act.unique range-v3) | ||
add_test(test.act.unique act.unique) | ||
rv3_add_test(test.act.concepts act.concepts cont_concepts.cpp) | ||
rv3_add_test(test.act.drop act.drop drop.cpp) | ||
rv3_add_test(test.act.drop_while act.drop_while drop_while.cpp) | ||
rv3_add_test(test.act.insert act.insert insert.cpp) | ||
rv3_add_test(test.act.join act.join join.cpp) | ||
rv3_add_test(test.act.push_front act.push_front push_front.cpp) | ||
rv3_add_test(test.act.push_back act.push_back push_back.cpp) | ||
rv3_add_test(test.act.remove_if act.remove_if remove_if.cpp) | ||
rv3_add_test(test.act.reverse act.reverse reverse.cpp) | ||
rv3_add_test(test.act.shuffle act.shuffle shuffle.cpp) | ||
rv3_add_test(test.act.slice act.slice slice.cpp) | ||
rv3_add_test(test.act.sort act.sort sort.cpp) | ||
rv3_add_test(test.act.split act.split split.cpp) | ||
rv3_add_test(test.act.stable_sort act.stable_sort stable_sort.cpp) | ||
rv3_add_test(test.act.stride act.stride stride.cpp) | ||
rv3_add_test(test.act.take act.take take.cpp) | ||
rv3_add_test(test.act.take_while act.take_while take_while.cpp) | ||
rv3_add_test(test.act.transform act.transform transform.cpp) | ||
rv3_add_test(test.act.unique act.unique unique.cpp) |
Oops, something went wrong.