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
cmake_minimum_required(VERSION 3.10) | |
include(ExternalProject) | |
ExternalProject_Add(fmtlib | |
GIT_REPOSITORY https://github.com/fmtlib/fmt.git | |
EXCLUDE_FROM_ALL TRUE | |
BUILD_COMMAND $(MAKE) fmt | |
STEP_TARGETS build) | |
set(fmtlib_BINARY_DIR "${CMAKE_BINARY_DIR}/fmtlib-prefix/src/fmtlib-build") | |
set(fmtlib_SOURCE_DIR "${CMAKE_BINARY_DIR}/fmtlib-prefix/src/fmtlib/include") | |
add_executable(fmttest fmttest.cpp) |
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
# Lets say we want to add a library and an executable, both with the same name. | |
# In this example, it is resman | |
add_library(resman ${src_cpps} ${src_hpps} ) | |
target_link_libraries(resman ${Boost_LIBRARIES} ${LIBYAML} ${LIBFMT}) | |
# | |
# Add resman executable | |
# | |
# We call the executable resman-bin | |
add_executable(resman-bin main.cpp ) |
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
local stringstream = {} | |
stringstream.__index = stringstream | |
function stringstream.create(str) | |
local out = setmetatable({}, stringstream) | |
out.buffer = str or "" | |
out.pos = 0 | |
out.__index = stringstream | |
return out |