upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / uncertainty-framework / trunk / ctest.patch
blobbbccf9f4eed3ccfacef7417cc4678981d4c7126e
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 06636b3..d7bc1f3 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -17,6 +17,31 @@ message(STATUS "CMAKE_CONFIGURATION_TYPES: ${CMAKE_CONFIGURATION_TYPES}")
6 message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
7 message(STATUS "---------------------------------------------------------")
10 +# -----------------------------------------------------------------------------
11 +# UNIT TEST macro
12 +# -----------------------------------------------------------------------------
13 +macro(UNIT_TEST NAMESPACE NAME EXTRA_LIBS)
14 + if(UNC_BUILD_TESTS)
15 + add_executable(${NAMESPACE}_test_${NAME} ${NAME}_test.cpp)
17 + set_property(TARGET ${NAMESPACE}_test_${NAME} PROPERTY FOLDER uncertaintyTE/test)
19 + target_link_libraries(${NAMESPACE}_test_${NAME}
20 + ${EXTRA_LIBS} # Extra libs MUST be first.
21 + ${BOOST_LIBRARIES} uncertaintyTE)
23 + target_include_directories(${NAMESPACE}_test_${NAME}
24 + PUBLIC
25 + .
26 + ${INCLUDE_DIRS})
28 + add_test(NAME ${NAMESPACE}_test_${NAME}
29 + WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
30 + COMMAND $<TARGET_FILE:${NAMESPACE}_test_${NAME}> --log_level=all)
31 + endif()
32 +endmacro()
34 # Guard against in-source builds
35 if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
36 message(FATAL_ERROR "In-source builds not allowed.")
37 @@ -264,31 +289,6 @@ if(WIN32)
38 message("Please add the library path to your project (e.g. 'c:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017.4.210/windows/compiler/lib/intel64_win')")
39 endif()
42 -# -----------------------------------------------------------------------------
43 -# UNIT TEST macro
44 -# -----------------------------------------------------------------------------
45 -macro(UNIT_TEST NAMESPACE NAME EXTRA_LIBS)
46 - if(UNC_BUILD_TESTS)
47 - add_executable(${NAMESPACE}_test_${NAME} ${NAME}_test.cpp)
49 - set_property(TARGET ${NAMESPACE}_test_${NAME} PROPERTY FOLDER uncertaintyTE/test)
51 - target_link_libraries(${NAMESPACE}_test_${NAME}
52 - ${EXTRA_LIBS} # Extra libs MUST be first.
53 - ${BOOST_LIBRARIES} uncertainty_shared)
55 - target_include_directories(${NAMESPACE}_test_${NAME}
56 - PUBLIC
57 - .
58 - ${INCLUDE_DIRS})
60 - add_test(NAME ${NAMESPACE}_test_${NAME}
61 - WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
62 - COMMAND $<TARGET_file:${NAMESPACE}_test_${NAME}> --log_level=all)
63 - endif()
64 -endmacro()
66 # -----------------------------------------------------------------------------
67 # STATUS
68 # -----------------------------------------------------------------------------
69 diff --git a/src/test_eigValues/CMakeLists.txt b/src/test_eigValues/CMakeLists.txt
70 index 79f39c7..8a3c5b6 100644
71 --- a/src/test_eigValues/CMakeLists.txt
72 +++ b/src/test_eigValues/CMakeLists.txt
73 @@ -1,5 +1,5 @@
74 # Add unit test
75 if(UNC_BUILD_TESTS)
76 # List of unit tests
77 - UNIT_TEST(cov covarianceEigenValues uncertainty)
78 + UNIT_TEST(cov covarianceEigenValues uncertaintyTE)
79 ENDIF()