- Timestamp:
- Apr 8, 2014, 10:03:01 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 build 2 CMakeLists.txt.user*
-
- 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.