comparison cmake/function/MalikaniaDefineTest.cmake @ 54:0edaba9986ba

CMake: add vera++, closes 602
author David Demelier <markand@malikania.fr>
date Fri, 16 Dec 2016 13:59:55 +0100
parents 2804ae55c70f
children 0a1e3bb3c629
comparison
equal deleted inserted replaced
53:fe7e3524e571 54:0edaba9986ba
30 # This will generate a target named test-<name> where name is the parameter NAME. The test is created 30 # This will generate a target named test-<name> where name is the parameter NAME. The test is created
31 # under CMAKE_BINARY_DIR/test/<NAME> and resources are copied there with the same hierarchy. 31 # under CMAKE_BINARY_DIR/test/<NAME> and resources are copied there with the same hierarchy.
32 # 32 #
33 33
34 include(CMakeParseArguments) 34 include(CMakeParseArguments)
35
36 include(${CMAKE_CURRENT_LIST_DIR}/MalikaniaVeraCheck.cmake)
35 37
36 function(malikania_create_test) 38 function(malikania_create_test)
37 set(singleArgs NAME) 39 set(singleArgs NAME)
38 set(multiArgs LIBRARIES SOURCES RESOURCES) 40 set(multiArgs LIBRARIES SOURCES RESOURCES)
39 41
96 ${TEST_LIBRARIES} 98 ${TEST_LIBRARIES}
97 ${Boost_unit_test_framework_LIBRARY} 99 ${Boost_unit_test_framework_LIBRARY}
98 ) 100 )
99 101
100 add_dependencies(tests test-${TEST_NAME}) 102 add_dependencies(tests test-${TEST_NAME})
103
104 malikania_vera_check(test-${TEST_NAME} ${TEST_SOURCES})
101 endfunction() 105 endfunction()