Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CMakeLists.txt > Rewrote Makefile to CMake to build the library itself * examples/CMakeLists.txt > Splitted the compilation of example applications into another file that centers around building application using the compiled library * README.md > Documented how to compile and incorporate reckless to other applications using CMake
- Loading branch information
1 parent
a6e62d8
commit e1178c8
Showing
3 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
project(reckless) | ||
CMAKE_MINIMUM_REQUIRED(VERSION 3.5) | ||
|
||
################################################################################ | ||
# Add Flags | ||
################################################################################ | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -O3 -g") | ||
|
||
|
||
|
||
################################################################################ | ||
# Build Libraries | ||
################################################################################ | ||
include_directories("boost") | ||
include_directories("reckless/include") | ||
|
||
add_library(reckless STATIC | ||
reckless/src/thread_input_buffer.cpp | ||
reckless/src/output_buffer.cpp | ||
reckless/src/ntoa.cpp | ||
reckless/src/crash_handler.cpp | ||
reckless/src/template_formatter.cpp | ||
reckless/src/writer.cpp | ||
reckless/src/basic_log.cpp | ||
reckless/src/policy_log.cpp | ||
reckless/src/file_writer.cpp | ||
reckless/src/posix_error_category.cpp | ||
reckless/src/utility.cpp | ||
reckless/src/fd_writer.cpp | ||
) | ||
|
||
|
||
|
||
################################################################################ | ||
# Build Examples | ||
################################################################################ | ||
message (STATUS "Making example applications") | ||
add_subdirectory(examples) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
project(reckless_examples) | ||
CMAKE_MINIMUM_REQUIRED(VERSION 3.5) | ||
|
||
|
||
|
||
################################################################################ | ||
# Build Examples | ||
################################################################################ | ||
add_executable(severity_log severity_log.cpp ) | ||
target_link_libraries(severity_log reckless pthread) | ||
|
||
add_executable(stderr_log stderr_log.cpp ) | ||
target_link_libraries(stderr_log reckless pthread) | ||
|
||
add_executable(ucs2_log ucs2_log.cpp ) | ||
target_link_libraries(ucs2_log reckless pthread) | ||
|
||
add_executable(custom_formatter custom_formatter.cpp ) | ||
target_link_libraries(custom_formatter reckless pthread) | ||
|