diff options
author | anonymous <local@localhost> | 2010-07-29 01:16:19 +0700 |
---|---|---|
committer | anonymous <local@localhost> | 2010-08-31 18:05:51 +0700 |
commit | 953c93d52c8cbc1326018984a9db0af23e158b08 (patch) | |
tree | 4cdee6e2447bbb2ce108dfd4c6c337d4c514500c /test | |
parent | 41de4207a476512f4d3298e238927aa6b436b57e (diff) | |
download | libcxxrt-953c93d52c8cbc1326018984a9db0af23e158b08.tar.gz libcxxrt-953c93d52c8cbc1326018984a9db0af23e158b08.tar.bz2 libcxxrt-953c93d52c8cbc1326018984a9db0af23e158b08.tar.xz |
Testing with libunwind is added
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 28da55e..8c06b25 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,14 +7,6 @@ set(CXXTEST_SOURCES ) -add_executable(cxxrt-test-static ${CXXTEST_SOURCES}) -set_property(TARGET cxxrt-test-static PROPERTY LINK_FLAGS -nodefaultlibs) -target_link_libraries(cxxrt-test-static cxxrt-static gcc_s pthread dl c) - -add_executable(cxxrt-test-shared ${CXXTEST_SOURCES}) -set_property(TARGET cxxrt-test-shared PROPERTY LINK_FLAGS -nodefaultlibs) -target_link_libraries(cxxrt-test-shared cxxrt-shared pthread dl c) - add_executable(system-test ${CXXTEST_SOURCES}) # Generating excpected output with system-test @@ -23,6 +15,14 @@ add_custom_target(test-expected-output ALL DEPENDS system-test) +add_executable(cxxrt-test-static ${CXXTEST_SOURCES}) +set_property(TARGET cxxrt-test-static PROPERTY LINK_FLAGS -nodefaultlibs) +target_link_libraries(cxxrt-test-static cxxrt-static gcc_s pthread dl c) + +add_executable(cxxrt-test-shared ${CXXTEST_SOURCES}) +set_property(TARGET cxxrt-test-shared PROPERTY LINK_FLAGS -nodefaultlibs) +target_link_libraries(cxxrt-test-shared cxxrt-shared pthread dl c) + add_test(cxxrt-test-static-test ${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/cxxrt-test-static @@ -34,3 +34,22 @@ add_test(cxxrt-test-shared-test ${CMAKE_CURRENT_BINARY_DIR}/expected_output.log) +# Testing with libunwind +option(TEST_LIBUNWIND "Test libcxxrt with libunwind" OFF) + +if(TEST_LIBUNWIND) + if(NOT LIBUNWIND_PATH) + message(FATAL_ERROR "Path to libunwind should be specified. Please set LIBUNWIND_PATH variable") + endif() + + add_executable(cxxrt-test-libunwind-static ${CXXTEST_SOURCES}) + set_property(TARGET cxxrt-test-libunwind-static PROPERTY LINK_FLAGS + "-L${LIBUNWIND_PATH} -nodefaultlibs") + target_link_libraries(cxxrt-test-libunwind-static cxxrt-static unwind pthread dl c) + + add_test(cxxrt-test-libunwind-static-test + ${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/cxxrt-test-libunwind-static + ${CMAKE_CURRENT_BINARY_DIR}/expected_output.log) +endif() + |