summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-05-05 13:55:29 +0100
committerJose Fonseca <jfonseca@vmware.com>2016-05-05 13:55:29 +0100
commitefc5d91d983a71e8749fe2201a96dc4ca82f4389 (patch)
tree2de4654c031e141adb528dda8aed1fe4f6e9909e
parentbceafecaa6a3e606dfc31c0016cecb9e82d5cab8 (diff)
os: Move to lib.
-rw-r--r--CMakeLists.txt1
-rw-r--r--common/CMakeLists.txt32
-rw-r--r--lib/CMakeLists.txt3
-rw-r--r--lib/os/CMakeLists.txt40
-rw-r--r--lib/os/os.hpp (renamed from common/os.hpp)0
-rw-r--r--lib/os/os_backtrace.cpp (renamed from common/os_backtrace.cpp)0
-rw-r--r--lib/os/os_backtrace.hpp (renamed from common/os_backtrace.hpp)0
-rw-r--r--lib/os/os_binary.hpp (renamed from common/os_binary.hpp)0
-rw-r--r--lib/os/os_crtdbg.cpp (renamed from common/os_crtdbg.cpp)0
-rw-r--r--lib/os/os_crtdbg.hpp (renamed from common/os_crtdbg.hpp)0
-rw-r--r--lib/os/os_dl.hpp (renamed from common/os_dl.hpp)0
-rw-r--r--lib/os/os_memory.hpp (renamed from common/os_memory.hpp)0
-rw-r--r--lib/os/os_osx.mm (renamed from common/os_osx.mm)0
-rw-r--r--lib/os/os_posix.cpp (renamed from common/os_posix.cpp)0
-rw-r--r--lib/os/os_process.hpp (renamed from common/os_process.hpp)0
-rw-r--r--lib/os/os_string.hpp (renamed from common/os_string.hpp)0
-rw-r--r--lib/os/os_thread.hpp (renamed from common/os_thread.hpp)0
-rw-r--r--lib/os/os_thread_test.cpp (renamed from common/os_thread_test.cpp)0
-rw-r--r--lib/os/os_time.hpp (renamed from common/os_time.hpp)0
-rw-r--r--lib/os/os_version.hpp (renamed from common/os_version.hpp)0
-rw-r--r--lib/os/os_win32.cpp (renamed from common/os_win32.cpp)0
-rw-r--r--lib/os/thread_pool.hpp (renamed from common/thread_pool.hpp)0
22 files changed, 44 insertions, 32 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 914b10cd..571c164e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -526,6 +526,7 @@ endmacro ()
# Common libraries / utilities
include_directories (
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib/os
${CMAKE_CURRENT_SOURCE_DIR}/common
${CMAKE_CURRENT_SOURCE_DIR}/compat
)
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index a01dc1ba..a3615616 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -4,14 +4,6 @@ include_directories (
${CMAKE_SOURCE_DIR}/thirdparty
)
-if (WIN32)
- set (os os_win32.cpp)
-elseif (APPLE)
- set (os os_posix.cpp os_osx.mm)
-else ()
- set (os os_posix.cpp)
-endif ()
-
add_convenience_library (common
trace_callset.cpp
trace_dump.cpp
@@ -32,36 +24,14 @@ add_convenience_library (common
trace_option.cpp
trace_ostream_snappy.cpp
trace_ostream_zlib.cpp
- ${os}
- os_backtrace.cpp
- os_crtdbg.cpp
)
target_link_libraries (common
guids
highlight
- ${LIBBACKTRACE_LIBRARIES}
+ os
brotli_dec_bundled
)
-if (WIN32)
- target_link_libraries (common
- shell32
- )
-endif ()
-if (ANDROID)
- target_link_libraries (common
- log
- )
-endif ()
-
-if (APPLE)
- target_link_libraries (common
- "-framework Foundation"
- )
-endif ()
-
-add_gtest (os_thread_test os_thread_test.cpp)
-target_link_libraries (os_thread_test common)
add_gtest (trace_parser_flags_test trace_parser_flags_test.cpp)
target_link_libraries (trace_parser_flags_test common)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 813e180a..23be7605 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,3 +1,4 @@
-add_subdirectory (guids)
+add_subdirectory (os)
add_subdirectory (highlight)
+add_subdirectory (guids)
add_subdirectory (image)
diff --git a/lib/os/CMakeLists.txt b/lib/os/CMakeLists.txt
new file mode 100644
index 00000000..222411e0
--- /dev/null
+++ b/lib/os/CMakeLists.txt
@@ -0,0 +1,40 @@
+include_directories (
+ ${CMAKE_SOURCE_DIR}/thirdparty
+)
+
+if (WIN32)
+ set (os os_win32.cpp)
+elseif (APPLE)
+ set (os os_posix.cpp os_osx.mm)
+else ()
+ set (os os_posix.cpp)
+endif ()
+
+add_convenience_library (os
+ ${os}
+ os_backtrace.cpp
+ os_crtdbg.cpp
+)
+
+target_link_libraries (os
+ ${LIBBACKTRACE_LIBRARIES}
+)
+if (WIN32)
+ target_link_libraries (os
+ shell32
+ )
+endif ()
+if (ANDROID)
+ target_link_libraries (os
+ log
+ )
+endif ()
+
+if (APPLE)
+ target_link_libraries (os
+ "-framework Foundation"
+ )
+endif ()
+
+add_gtest (os_thread_test os_thread_test.cpp)
+target_link_libraries (os_thread_test os)
diff --git a/common/os.hpp b/lib/os/os.hpp
index b9d3fc21..b9d3fc21 100644
--- a/common/os.hpp
+++ b/lib/os/os.hpp
diff --git a/common/os_backtrace.cpp b/lib/os/os_backtrace.cpp
index c95692bd..c95692bd 100644
--- a/common/os_backtrace.cpp
+++ b/lib/os/os_backtrace.cpp
diff --git a/common/os_backtrace.hpp b/lib/os/os_backtrace.hpp
index 72869c26..72869c26 100644
--- a/common/os_backtrace.hpp
+++ b/lib/os/os_backtrace.hpp
diff --git a/common/os_binary.hpp b/lib/os/os_binary.hpp
index c3a1d6ea..c3a1d6ea 100644
--- a/common/os_binary.hpp
+++ b/lib/os/os_binary.hpp
diff --git a/common/os_crtdbg.cpp b/lib/os/os_crtdbg.cpp
index 21dec6ec..21dec6ec 100644
--- a/common/os_crtdbg.cpp
+++ b/lib/os/os_crtdbg.cpp
diff --git a/common/os_crtdbg.hpp b/lib/os/os_crtdbg.hpp
index 87a018ba..87a018ba 100644
--- a/common/os_crtdbg.hpp
+++ b/lib/os/os_crtdbg.hpp
diff --git a/common/os_dl.hpp b/lib/os/os_dl.hpp
index bf79d507..bf79d507 100644
--- a/common/os_dl.hpp
+++ b/lib/os/os_dl.hpp
diff --git a/common/os_memory.hpp b/lib/os/os_memory.hpp
index 5a852516..5a852516 100644
--- a/common/os_memory.hpp
+++ b/lib/os/os_memory.hpp
diff --git a/common/os_osx.mm b/lib/os/os_osx.mm
index 9901708e..9901708e 100644
--- a/common/os_osx.mm
+++ b/lib/os/os_osx.mm
diff --git a/common/os_posix.cpp b/lib/os/os_posix.cpp
index 74594c3f..74594c3f 100644
--- a/common/os_posix.cpp
+++ b/lib/os/os_posix.cpp
diff --git a/common/os_process.hpp b/lib/os/os_process.hpp
index 880242f8..880242f8 100644
--- a/common/os_process.hpp
+++ b/lib/os/os_process.hpp
diff --git a/common/os_string.hpp b/lib/os/os_string.hpp
index 2eb797bd..2eb797bd 100644
--- a/common/os_string.hpp
+++ b/lib/os/os_string.hpp
diff --git a/common/os_thread.hpp b/lib/os/os_thread.hpp
index fa080b91..fa080b91 100644
--- a/common/os_thread.hpp
+++ b/lib/os/os_thread.hpp
diff --git a/common/os_thread_test.cpp b/lib/os/os_thread_test.cpp
index 7385b00c..7385b00c 100644
--- a/common/os_thread_test.cpp
+++ b/lib/os/os_thread_test.cpp
diff --git a/common/os_time.hpp b/lib/os/os_time.hpp
index e3f63aff..e3f63aff 100644
--- a/common/os_time.hpp
+++ b/lib/os/os_time.hpp
diff --git a/common/os_version.hpp b/lib/os/os_version.hpp
index ad85de7d..ad85de7d 100644
--- a/common/os_version.hpp
+++ b/lib/os/os_version.hpp
diff --git a/common/os_win32.cpp b/lib/os/os_win32.cpp
index 66492ca8..66492ca8 100644
--- a/common/os_win32.cpp
+++ b/lib/os/os_win32.cpp
diff --git a/common/thread_pool.hpp b/lib/os/thread_pool.hpp
index 9ccba267..9ccba267 100644
--- a/common/thread_pool.hpp
+++ b/lib/os/thread_pool.hpp