Changeset 301 in pacpusframework for trunk/cmake/PacpusUtilities.cmake


Ignore:
Timestamp:
Apr 8, 2014, 10:03:01 AM (11 years ago)
Author:
Marek Kurdej
Message:

Some Unix fixes

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11build
         2CMakeLists.txt.user*
  • trunk/cmake/PacpusUtilities.cmake

    r267 r301  
    378378endfunction()
    379379
     380################################################################################
     381# pacpus_add_test_executable(TEST_NAME SOURCES)
     382function(pacpus_add_test_executable TEST_NAME)
     383    set(SOURCES ${ARGN})
     384    if(DEBUG)
     385        message(STATUS "SOURCES = ${SOURCES}")
     386    endif()
     387    set(EXE_NAME ${TEST_NAME})
     388    pacpus_add_executable(${EXE_NAME} ${SOURCES})
     389    add_test(
     390        NAME ${TEST_NAME}
     391        WORKING_DIRECTORY ${PACPUS_INSTALL_DIR}/bin
     392        COMMAND ${EXE_NAME}
     393    )
     394    set_target_properties(${TEST_NAME} PROPERTIES FOLDER "tests")
     395    target_link_libraries(${EXE_NAME}
     396        ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
     397        ${PACPUS_LIBRARIES}
     398        ${PACPUS_DEPENDENCIES_LIB}
     399        #${QT_LIBRARIES}
     400    )
     401endfunction()
     402
    380403# ========================================
    381404# Get sub directories
Note: See TracChangeset for help on using the changeset viewer.