Changeset 301 in pacpusframework
- Timestamp:
- Apr 8, 2014, 10:03:01 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 build 2 CMakeLists.txt.user*
-
- Property svn:ignore
-
trunk/CMakeLists.txt
r250 r301 33 33 set(PACPUS_SCRIPTS_DIR ${PACPUS_ROOT_DIR}/scripts) 34 34 set(PACPUS_SOURCE_DIR ${PACPUS_ROOT_DIR}/src) 35 set(PACPUS_TEST_DIR ${PACPUS_ROOT_DIR}/test) 35 36 set(IS_BUILDING_PACPUS TRUE) 36 37 37 38 set(PACPUS_DEFINITIONS "") 39 40 ################################################################################ 41 set(PACPUS_BUILD_TESTS TRUE CACHE BOOL "Whether build the tests") 38 42 39 43 ################################################################################ … … 93 97 94 98 ################################################################################ 99 # TESTS 100 if(${PACPUS_BUILD_TESTS}) 101 enable_testing() 102 #add_subdirectory(${PACPUS_TEST_DIR}) 103 endif() 104 105 ################################################################################ 95 106 # SUMMARY 96 107 pacpus_info("") -
trunk/cmake/PacpusDependencies.cmake
r285 r301 123 123 list(APPEND PACPUS_DEPENDENCIES_LIB ${Boost_LIBRARIES}) 124 124 endif() 125 125 126 if(PACPUS_USE_LOG) 126 127 find_package(Boost 1.54.0 REQUIRED … … 130 131 log_setup # log 131 132 ) 132 include_directories(${Boost_INCLUDE_DIRS}) 133 link_directories(${Boost_LIBRARY_DIRS}) 133 list(APPEND PACPUS_DEPENDENCIES_INC ${Boost_INCLUDE_DIRS}) 134 list(APPEND PACPUS_DEPENDENCIES_LIB ${Boost_LIBRARIES}) 135 endif() 136 if(PACPUS_BUILD_TESTS) 137 find_package(Boost 1.21.0 REQUIRED 138 COMPONENTS 139 unit_test_framework 140 ) 134 141 list(APPEND PACPUS_DEPENDENCIES_INC ${Boost_INCLUDE_DIRS}) 135 142 list(APPEND PACPUS_DEPENDENCIES_LIB ${Boost_LIBRARIES}) -
trunk/cmake/PacpusUtilities.cmake
r267 r301 378 378 endfunction() 379 379 380 ################################################################################ 381 # pacpus_add_test_executable(TEST_NAME SOURCES) 382 function(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 ) 401 endfunction() 402 380 403 # ======================================== 381 404 # Get sub directories -
trunk/examples/ProducerConsumerExample/CMakeLists.txt
r189 r301 9 9 10 10 ################################################################################ 11 # INCLUDES11 # DIRECTORIES 12 12 include_directories( 13 13 ${PACPUSCITYVIP_INCLUDE_DIR} … … 16 16 ) 17 17 18 ################################################################################19 # Link directories20 18 set(SRC_BINARY_DIR "${PROJECT_BINARY_DIR}/../../src") 21 19 get_filename_component(SRC_BINARY_DIR "${SRC_BINARY_DIR}" ABSOLUTE) … … 24 22 ${SRC_BINARY_DIR}/PacpusLib 25 23 ${SRC_BINARY_DIR}/PacpusTools 26 24 ${SRC_BINARY_DIR}/RoadTime 27 25 ) 28 26 … … 78 76 ) 79 77 endif() 80 #message(STATUS "\${PACPUS_LIBRARIES} = ${PACPUS_LIBRARIES}") 81 #message(STATUS "\${PACPUS_DEPENDENCIES_LIB} = ${PACPUS_DEPENDENCIES_LIB}") 78 82 79 # LIBS 83 80 set(LIBS 84 81 ${PACPUS_LIBRARIES} 85 ${PACPUS_DEPENDENCIES_LIB} 86 #${OpenCV_LIBRARIES} 82 ${PACPUS_DEPENDENCIES_LIB} 87 83 ${QT_LIBRARIES} 88 84 ) -
trunk/examples/ProducerConsumerExample/ProducerExample.cpp
r293 r301 60 60 using boost::ref; 61 61 62 std::fstream mFile(mOutputFileName , std::ios_base::out | std::ios_base::app);62 std::fstream mFile(mOutputFileName.c_str(), std::ios_base::out | std::ios_base::app); 63 63 if (!mFile.is_open()) { 64 64 LOG_ERROR("file '" << mOutputFileName << "' cannot be opened"); -
trunk/include/Pacpus/PacpusTools
- Property svn:ignore
-
old new 1 QSerialPort.h 2 pacpusStruct.h 1 *Config.h
-
- Property svn:ignore
-
trunk/include/Pacpus/kernel
- Property svn:ignore
-
old new 1 CommunicationComponent.h1 *Config.h
-
- Property svn:ignore
-
trunk/src/FileLib/CMakeLists.txt
r111 r301 9 9 project(FileLib) 10 10 11 # ======================================== 12 # Compiler definitions 13 # ======================================== 14 add_definitions( 15 -DFILELIB_EXPORTS 11 ################################################################################ 12 create_export(EXPORT_HDR ${PROJECT_NAME} "${PACPUS_INCLUDE_DIR}/Pacpus/kernel") 13 14 ################################################################################ 15 # DIRECTORIES 16 link_directories( 17 ${PROJECT_BINARY_DIR}/../PacpusLib 16 18 ) 17 19 18 # ========================================19 # Link directories20 # ======================================== 21 link_directories( 22 ${PROJECT_BINARY_DIR}/../PacpusLib20 ################################################################################ 21 # FILES 22 set(SRCS 23 src/DbiteException.cpp 24 src/DbiteFile.cpp 23 25 ) 24 26 25 # ======================================== 26 # List of sources 27 # ======================================== 28 set( 29 PROJECT_SRCS 27 set(HDRS 28 ${EXPORT_HDR} 29 30 30 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteException.h 31 31 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFile.h 32 32 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFileTypes.h 33 33 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/FileLibConfig.h 34 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/hdfile_header_t 34 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/hdfile_header_t.h 35 35 ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h 36 src/DbiteException.cpp37 src/DbiteFile.cpp38 36 ) 39 37 40 # ======================================== 41 # Build a library 42 # ======================================== 43 pacpus_add_library( 44 ${PROJECT_NAME} SHARED 45 ${PROJECT_SRCS} 38 ################################################################################ 39 # BUILD and LINK 40 pacpus_add_library(${PROJECT_NAME} SHARED 41 ${SRCS} 42 ${HDRS} 46 43 ) 47 44 48 # ======================================== 49 # Libraries 50 # ======================================== 45 # LIBS 46 set(LIBS 47 ${PACPUS_DEPENDENCIES_LIB} 48 ) 49 51 50 if(WIN32) 52 target_link_libraries( 53 ${PROJECT_NAME} 54 ${PACPUS_DEPENDENCIES_LIB} 55 optimized PacpusLib debug PacpusLib_d 56 ) 51 list(APPEND LIBS 52 optimized PacpusLib debug PacpusLib_d 53 ) 57 54 endif() 58 55 59 # ======================================== 56 # LINK 57 target_link_libraries(${PROJECT_NAME} 58 ${LIBS} 59 ) 60 61 if(${PACPUS_BUILD_TESTS}) 62 link_directories( 63 ${PROJECT_BINARY_DIR}/../FileLib 64 ) 65 pacpus_add_test_executable(Test${PROJECT_NAME} 66 test/TestFileLib.cpp 67 ${HDRS} 68 ) 69 list(APPEND LIBS 70 ${QT_LIBRARIES} 71 optimized PacpusLib debug PacpusLib_d 72 optimized ${PROJECT_NAME} debug ${PROJECT_NAME}_d 73 ) 74 target_link_libraries(Test${PROJECT_NAME} 75 ${LIBS} 76 ) 77 endif() 78 79 ################################################################################ 60 80 # Install 61 # ========================================62 81 pacpus_install(${PROJECT_NAME}) 63 82 64 # ======================================== 65 # Folder 66 # ======================================== 83 ################################################################################ 84 # FOLDER 67 85 pacpus_folder(${PROJECT_NAME} "libraries") -
trunk/src/FileLib/test/TestFileLib.cpp
r89 r301 17 17 #endif // _MSC_VER 18 18 19 #include <Pacpus/kernel/DbiteException.h> 20 #include <Pacpus/kernel/DbiteFile.h> 21 #include <Pacpus/kernel/Log.h> 22 19 23 #include <boost/noncopyable.hpp> 20 24 #include <cstdio> 21 25 22 #include "kernel/DbiteException.h" 23 #include "kernel/DbiteFile.h" 24 #include "kernel/Log.h" 25 26 DECLARE_STATIC_LOGGER("pacpus.core.TestFileLib"); 26 DECLARE_STATIC_LOGGER("pacpus.framework.test.FileLib"); 27 27 28 28 using namespace boost; -
trunk/src/PacpusLib/ColorSeverityFormatter.hpp
r244 r301 26 26 #include <cstdlib> 27 27 #include <sstream> 28 #include <string> 28 29 29 30 // could use Boost.Predef with Boost >= 1.55 … … 141 142 #else 142 143 // On non-Windows platforms, we rely on the TERM variable. 143 const char*const term = std::getenv("TERM");144 std::string const term = std::getenv("TERM"); 144 145 const bool termSupportsColor = (term == "xterm") 145 || (term ,"xterm-color")146 || (term ,"xterm-256color")147 || (term ,"screen")148 || (term ,"linux")149 || (term ,"cygwin");146 || (term == "xterm-color") 147 || (term == "xterm-256color") 148 || (term == "screen") 149 || (term == "linux") 150 || (term == "cygwin"); 150 151 return stdoutIsTty && termSupportsColor; 151 152 #endif // defined(PACPUS_OS_WINDOWS) && !defined(PACPUS_OS_WINDOWS_MOBILE)
Note:
See TracChangeset
for help on using the changeset viewer.