Add cppunit on OS X as well
This commit is contained in:
parent
ccc027b381
commit
bc777e04ca
3 changed files with 4 additions and 3 deletions
|
@ -30,6 +30,7 @@ FUNCTION(ADD_SOURCES TARGET PATH)
|
|||
ENDFUNCTION()
|
||||
|
||||
IF(ENABLE_TESTING)
|
||||
FIND_LIBRARY(CPPUNIT cppunit)
|
||||
ADD_SUBDIRECTORY(common)
|
||||
ADD_SUBDIRECTORY(service)
|
||||
|
||||
|
@ -42,7 +43,7 @@ IF(ENABLE_TESTING)
|
|||
ADD_SOURCES(${telldus-service_TARGET} ${CMAKE_SOURCE_DIR}/service)
|
||||
|
||||
ADD_TEST(cppunit ${CMAKE_CURRENT_BINARY_DIR}/TestRunner)
|
||||
IF (UNIX AND NOT APPLE)
|
||||
IF (UNIX)
|
||||
ADD_TEST(cppcheck cppcheck --quiet --error-exitcode=2 ${CMAKE_SOURCE_DIR})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
|
|
@ -4,6 +4,6 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common)
|
|||
|
||||
ADD_LIBRARY(TelldusCommonTests SHARED ${SRCS} )
|
||||
|
||||
TARGET_LINK_LIBRARIES( TelldusCommonTests TelldusCommon )
|
||||
TARGET_LINK_LIBRARIES( TelldusCommonTests TelldusCommon ${CPPUNIT} )
|
||||
ADD_DEPENDENCIES( TelldusCommonTests TelldusCommon )
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
|
|||
|
||||
ADD_LIBRARY(TelldusServiceTests SHARED ${SRCS} )
|
||||
|
||||
TARGET_LINK_LIBRARIES( TelldusServiceTests TelldusServiceStatic )
|
||||
TARGET_LINK_LIBRARIES( TelldusServiceTests TelldusServiceStatic ${CPPUNIT} )
|
||||
ADD_DEPENDENCIES( TelldusServiceTests ${telldus-service_TARGET} )
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue