more info on index site and css added
parent
69d6b27f31
commit
9b30acc5e2
@ -0,0 +1,96 @@
|
||||
#
|
||||
# Utility macros for copying files
|
||||
#
|
||||
# Last update: 9th January 2013
|
||||
#
|
||||
|
||||
#
|
||||
# Create a target for copying files.
|
||||
#
|
||||
if (NOT TARGET copy_files)
|
||||
add_custom_target(copy_files ALL)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Create a variable to keep track of the number of copy files targets created.
|
||||
#
|
||||
if (NOT copy_target_count)
|
||||
set(copy_target_count 0)
|
||||
endif (NOT copy_target_count)
|
||||
set(copy_target_count ${copy_target_count} CACHE INTERNAL "" FORCE)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Macro: COPY_FILES
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Description:
|
||||
# Adds a command to the build target 'copy_files' which copies files matching
|
||||
# the specifeid globbing expression from the specified source directory to
|
||||
# the specified destination directory.
|
||||
#
|
||||
# Usage:
|
||||
# COPY_FILES(SRC_DIR GLOB_PAT DST_DIR)
|
||||
#
|
||||
# Arguments:
|
||||
# - SRC_DIR : The source directory containging files to be copied.
|
||||
# - GLOB_PAT : globbing expression used to match files for copying.
|
||||
# - DST_DIR : The destination directory where files are to be copied to.
|
||||
#
|
||||
# Example:
|
||||
# copy_files(${CMAKE_CURRENT_SOURCE_DIR} *.dat ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# Will copy all files in the current source directory with the extension
|
||||
# '.dat' into the current binary directory.
|
||||
#
|
||||
macro(COPY_FILES SRC_DIR GLOB_PAT DST_DIR)
|
||||
file(GLOB file_list
|
||||
RELATIVE ${SRC_DIR}
|
||||
${SRC_DIR}/${GLOB_PAT})
|
||||
math(EXPR copy_target_count '${copy_target_count}+1')
|
||||
set(copy_target_count ${copy_target_count} CACHE INTERNAL "" FORCE)
|
||||
set(target "copy_files_${copy_target_count}")
|
||||
add_custom_target(${target})
|
||||
foreach(filename ${file_list})
|
||||
set(src "${SRC_DIR}/${filename}")
|
||||
set(dst "${DST_DIR}/${filename}")
|
||||
add_custom_command(TARGET ${target} PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${src} ${dst}
|
||||
COMMENT "copying: ${src} to ${dst} " VERBATIM
|
||||
)
|
||||
endforeach(filename)
|
||||
#add_dependencies(copy_files ${target})
|
||||
add_dependencies(copy_files crowxmr)
|
||||
endmacro(COPY_FILES)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Macro: COPY_FILE
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Description:
|
||||
# Adds a command to the build target 'copy_files' which copies the specified
|
||||
# file to the specified destination.
|
||||
#
|
||||
# Usage:
|
||||
# COPY_FILE(SRC DST)
|
||||
#
|
||||
# Arguments:
|
||||
# - SRC : The source filename path (the file to be copied).
|
||||
# - DST : The destiation filename path.
|
||||
#
|
||||
# Example:
|
||||
# copy_file(
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/myfile.txt
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/myfile.txt
|
||||
# )
|
||||
#
|
||||
macro(COPY_FILE SRC DST)
|
||||
math(EXPR copy_target_count '${copy_target_count}+1')
|
||||
set(copy_target_count ${copy_target_count} CACHE INTERNAL "" FORCE)
|
||||
set(target "copy_files_${copy_target_count}")
|
||||
add_custom_target(${target})
|
||||
add_custom_command(TARGET ${target} PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${SRC} ${DST}
|
||||
COMMENT "copying: ${SRC} to ${DST}" VERBATIM
|
||||
)
|
||||
add_dependencies(copy_files ${target})
|
||||
endmacro(COPY_FILE)
|
||||
|
@ -0,0 +1,57 @@
|
||||
//
|
||||
// Created by mwo on 24/05/15.
|
||||
//
|
||||
// source: http://codereview.stackexchange.com/questions/13176/infix-iterator-code
|
||||
|
||||
// infix_iterator.h
|
||||
#if !defined(INFIX_ITERATOR_H_)
|
||||
#define INFIX_ITERATOR_H_
|
||||
#include <ostream>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
|
||||
template <class T, class charT=char, class traits=std::char_traits<charT> >
|
||||
class infix_ostream_iterator :
|
||||
public std::iterator<std::output_iterator_tag, void, void, void, void>
|
||||
{
|
||||
std::basic_ostream<charT,traits> *os;
|
||||
std::basic_string<charT> delimiter;
|
||||
std::basic_string<charT> real_delim;
|
||||
|
||||
public:
|
||||
|
||||
typedef charT char_type;
|
||||
typedef traits traits_type;
|
||||
typedef std::basic_ostream<charT, traits> ostream_type;
|
||||
|
||||
infix_ostream_iterator(ostream_type &s)
|
||||
: os(&s)
|
||||
{}
|
||||
|
||||
infix_ostream_iterator(ostream_type &s, charT const *d)
|
||||
: os(&s),
|
||||
real_delim(d)
|
||||
{}
|
||||
|
||||
infix_ostream_iterator<T, charT, traits> &operator=(T const &item)
|
||||
{
|
||||
*os << delimiter << item;
|
||||
delimiter = real_delim;
|
||||
return *this;
|
||||
}
|
||||
|
||||
infix_ostream_iterator<T, charT, traits> &operator*() {
|
||||
return *this;
|
||||
}
|
||||
|
||||
infix_ostream_iterator<T, charT, traits> &operator++() {
|
||||
return *this;
|
||||
}
|
||||
|
||||
infix_ostream_iterator<T, charT, traits> &operator++(int) {
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,5 @@
|
||||
tr {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size : 14px;
|
||||
height: 22px;
|
||||
}
|
Loading…
Reference in New Issue