Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-05-19 02:10:56


Author: dgregor
Date: 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
New Revision: 4129
URL: http://svn.boost.org/trac/boost/changeset/4129

Log:
Added support for IO and IOStreams libraries, plus fixed the handling of LIBRARIES argument to boost_library macro

Added:
   sandbox/troy/boost_1_34_0/libs/io/CMakeLists.txt
   sandbox/troy/boost_1_34_0/libs/io/test/CMakeLists.txt
   sandbox/troy/boost_1_34_0/libs/iostreams/CMakeLists.txt
   sandbox/troy/boost_1_34_0/libs/iostreams/src/CMakeLists.txt
   sandbox/troy/boost_1_34_0/libs/iostreams/test/CMakeLists.txt
Text files modified:
   sandbox/troy/boost_1_34_0/libs/date_time/src/CMakeLists.txt | 2 +-
   sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake | 2 ++
   2 files changed, 3 insertions(+), 1 deletions(-)

Modified: sandbox/troy/boost_1_34_0/libs/date_time/src/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/libs/date_time/src/CMakeLists.txt (original)
+++ sandbox/troy/boost_1_34_0/libs/date_time/src/CMakeLists.txt 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
@@ -1,4 +1,4 @@
-add_definitions(-DBOOST_SIGNALS_NO_LIB=1)
+add_definitions(-DBOOST_DATE_TIME_NO_LIB=1)
 boost_library(
   boost_date_time
   gregorian/greg_month.cpp gregorian/greg_weekday.cpp gregorian/date_generators.cpp

Added: sandbox/troy/boost_1_34_0/libs/io/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/libs/io/CMakeLists.txt 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
@@ -0,0 +1,2 @@
+boost_library_subproject(IO
+ TESTDIRS test)
\ No newline at end of file

Added: sandbox/troy/boost_1_34_0/libs/io/test/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/libs/io/test/CMakeLists.txt 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
@@ -0,0 +1,2 @@
+boost_test_run(ios_state_unit_test LIBRARIES boost_unit_test_framework-static)
+boost_test_run(ios_state_test LIBRARIES boost_test_exec_monitor-static)
\ No newline at end of file

Added: sandbox/troy/boost_1_34_0/libs/iostreams/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/libs/iostreams/CMakeLists.txt 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
@@ -0,0 +1,5 @@
+boost_library_subproject(
+ IOStreams
+ SRCDIRS src
+ TESTDIRS test
+ )
\ No newline at end of file

Added: sandbox/troy/boost_1_34_0/libs/iostreams/src/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/libs/iostreams/src/CMakeLists.txt 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
@@ -0,0 +1,32 @@
+set(BOOST_IOSTREAMS_EXTRA_SOURCES)
+set(BOOST_IOSTREAMS_LIBRARIES)
+
+# Find zlib. If it's available, include it in the iostreams build
+set(ZLIB_FIND_QUIETLY TRUE)
+include(FindZLIB)
+if (ZLIB_FOUND)
+ include_directories(${ZLIB_INCLUDE_DIR})
+ set(BOOST_IOSTREAMS_EXTRA_SOURCES
+ ${BOOST_IOSTREAMS_EXTRA_SOURCES} zlib.cpp)
+ set(BOOST_IOSTREAMS_LIBRARIES
+ ${BOOST_IOSTREAMS_LIBRARIES} ${ZLIB_LIBRARIES})
+endif(ZLIB_FOUND)
+
+# Find bzip2. If it's available, include it in the iostreams build
+set(BZip2_FIND_QUIETLY TRUE)
+include(FindBZip2)
+if (BZIP2_FOUND)
+ include_directories(${BZIP2_INCLUDE_DIR})
+ add_definitions(${BZIP2_DEFINITIONS})
+ set(BOOST_IOSTREAMS_EXTRA_SOURCES
+ ${BOOST_IOSTREAMS_EXTRA_SOURCES} bzip2.cpp)
+ set(BOOST_IOSTREAMS_LIBRARIES
+ ${BOOST_IOSTREAMS_LIBRARIES} ${BZIP2_LIBRARIES})
+
+ # NOTE: What to do about BZIP2_NEED_PREFIX?
+endif(BZIP2_FOUND)
+
+boost_library(boost_iostreams
+ file_descriptor.cpp mapped_file.cpp ${BOOST_IOSTREAMS_EXTRA_SOURCES}
+ LIBRARIES "${BOOST_IOSTREAMS_LIBRARIES}"
+ SHARED_COMPILE_FLAGS "-DBOOST_IOSTREAMS_DYN_LINK=1")
\ No newline at end of file

Added: sandbox/troy/boost_1_34_0/libs/iostreams/test/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/libs/iostreams/test/CMakeLists.txt 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
@@ -0,0 +1,66 @@
+# Helper macro to create tests for the iostreams library
+macro(iostreams_test TESTNAME)
+ boost_test_run(${TESTNAME}
+ ${ARGN}
+ LIBRARIES boost_unit_test_framework-static
+ COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")
+endmacro(iostreams_test)
+
+iostreams_test(array_test)
+iostreams_test(auto_close_test)
+iostreams_test(buffer_size_test)
+iostreams_test(code_converter_test
+ SOURCES code_converter_test.cpp detail/utf8_codecvt_facet.cpp)
+iostreams_test(compose_test)
+iostreams_test(component_access_test)
+iostreams_test(copy_test)
+iostreams_test(counter_test)
+iostreams_test(direct_adapter_test)
+iostreams_test(example_test)
+iostreams_test(file_test)
+boost_test_run(file_descriptor_test
+ LIBRARIES boost_unit_test_framework-static boost_iostreams-static
+ COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")
+iostreams_test(filtering_stream_test)
+iostreams_test(finite_state_filter_test)
+iostreams_test(flush_test)
+iostreams_test(invert_test)
+iostreams_test(line_filter_test)
+boost_test_run(mapped_file_test
+ LIBRARIES boost_unit_test_framework-static boost_iostreams-static
+ COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")
+iostreams_test(newline_test)
+iostreams_test(null_test)
+iostreams_test(pipeline_test)
+iostreams_test(positioning_test)
+boost_test_run(regex_filter_test
+ LIBRARIES boost_unit_test_framework-static boost_regex-static
+ COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")
+iostreams_test(restrict_test)
+iostreams_test(seekable_file_test)
+iostreams_test(seekable_filter_test)
+iostreams_test(stdio_filter_test)
+iostreams_test(symmetric_filter_test)
+iostreams_test(tee_test)
+iostreams_test(wide_stream_test)
+
+# Find zlib. If it's available, test it
+set(ZLIB_FIND_QUIETLY TRUE)
+include(FindZLIB)
+if (ZLIB_FOUND)
+ boost_test_run(gzip_test
+ LIBRARIES boost_unit_test_framework-static boost_iostreams-static
+ COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")
+ boost_test_run(zlib_test
+ LIBRARIES boost_unit_test_framework-static boost_iostreams-static
+ COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")
+endif(ZLIB_FOUND)
+
+# Find BZip2. If it's available, test it
+set(BZip2_FIND_QUIETLY TRUE)
+include(FindBZip2)
+if (BZIP2_FOUND)
+ boost_test_run(bzip2_test
+ LIBRARIES boost_unit_test_framework-static boost_iostreams-static
+ COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")
+endif(BZIP2_FOUND)

Modified: sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake
==============================================================================
--- sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake (original)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/boost-core.cmake 2007-05-19 02:10:55 EDT (Sat, 19 May 2007)
@@ -232,6 +232,7 @@
       )
     ADD_DEPENDENCIES(${libname} "${libname}-static")
     trace("sticky statics(${libname}): ${THIS_LIB_STICKY_STATIC_COMPILE_FLAGS}")
+ target_link_libraries("${libname}-static" ${THIS_LIB_LIBRARIES})
     foreach(dependency ${THIS_LIB_DEPENDS})
       target_link_libraries("${libname}-static" "${dependency}-static")
       propagate_property(FROM_TARGET "${dependency}-static"
@@ -258,6 +259,7 @@
       SOVERSION "${BOOST_VERSION}"
       )
     ADD_DEPENDENCIES(${libname} "${libname}-shared")
+ target_link_libraries("${libname}-shared" ${THIS_LIB_LIBRARIES})
     foreach(dependency ${THIS_LIB_DEPENDS})
       target_link_libraries("${libname}-shared" "${dependency}-shared")
       propagate_property(FROM_TARGET "${dependency}-shared"


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk