-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adapted to biicode via biicode.conf, ignore.bii and CMakeLists.txt; m…
…ixed Travis (original and biicode building)
- Loading branch information
1 parent
cfd476b
commit 7b77eb6
Showing
7 changed files
with
98 additions
and
3 deletions.
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
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,16 @@ | ||
# Biicode configuration file | ||
|
||
[paths] | ||
# Local directories to look for headers (within block) | ||
/ | ||
|
||
[dependencies] | ||
# Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=) | ||
CMakeLists.txt + cmake/FindSetEnv.cmake | ||
format.h = format.cc | ||
format.cc - test/* posix.cc | ||
biicode/samples/basic.cpp - test/* | ||
|
||
[mains] | ||
# Manual adjust of files that define an executable | ||
!test/test-main.cc |
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,18 @@ | ||
# Initializes block variables | ||
INIT_BIICODE_BLOCK() | ||
|
||
# Actually create targets: EXEcutables and libraries. | ||
ADD_BIICODE_TARGETS() | ||
|
||
target_include_directories(${BII_BLOCK_TARGET} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
if (HAVE_OPEN) | ||
target_compile_definitions(${BII_BLOCK_TARGET} INTERFACE -DFMT_USE_FILE_DESCRIPTORS=1) | ||
endif () | ||
|
||
if (CMAKE_COMPILER_IS_GNUCXX) | ||
target_compile_options(${BII_BLOCK_TARGET} INTERFACE -Wall -Wextra -Wshadow -pedantic) | ||
endif () | ||
if (CPP11_FLAG AND FMT_EXTRA_TESTS) | ||
target_compile_options(${BII_BLOCK_TARGET} INTERFACE ${CPP11_FLAG}) | ||
endif () |
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,18 @@ | ||
#include "vitaut/cppformat/format.h" | ||
|
||
class Date { | ||
int year_, month_, day_; | ||
public: | ||
Date(int year, int month, int day) : year_(year), month_(month), day_(day) {} | ||
|
||
friend std::ostream &operator<<(std::ostream &os, const Date &d) { | ||
return os << d.year_ << '-' << d.month_ << '-' << d.day_; | ||
} | ||
}; | ||
|
||
int main(int argc, char *argv[]){ | ||
std::string s = fmt::format("The date is {}", Date(2012, 12, 9)); | ||
fmt::print("Hello, {}!", "world"); // uses Python-like format string syntax | ||
fmt::printf("\n%s", s); // uses printf format string syntax | ||
return 0; | ||
} |
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,30 @@ | ||
#!/bin/bash | ||
|
||
if [ $TRAVIS_OS_NAME == linux ]; then | ||
sudo apt-get install libglu1-mesa-dev xorg-dev | ||
wget http://www.biicode.com/downloads/latest/ubuntu64 | ||
mv ubuntu64 bii-ubuntu64.deb | ||
(sudo dpkg -i bii-ubuntu64.deb) && sudo apt-get -f install | ||
rm bii-ubuntu64.deb | ||
wget https://s3.amazonaws.com/biibinaries/thirdparty/cmake-3.0.2-Linux-64.tar.gz | ||
tar -xzf cmake-3.0.2-Linux-64.tar.gz | ||
sudo cp -fR cmake-3.0.2-Linux-64/* /usr | ||
rm -rf cmake-3.0.2-Linux-64 | ||
rm cmake-3.0.2-Linux-64.tar.gz | ||
elif [ $TRAVIS_OS_NAME == osx ]; then | ||
wget http://www.biicode.com/downloads/latest/macos | ||
mv macos macos.pkg | ||
sudo installer -pkg macos.pkg -target / | ||
rm macos.pkg | ||
fi | ||
|
||
cmake --version | ||
bii init biicode_project | ||
mkdir -p ./biicode_project/blocks/vitaut/cppformat | ||
shopt -s extglob | ||
mv !(biicode_project|cmake-3.0.2-Darwin64-universal) ./biicode_project/blocks/vitaut/cppformat | ||
cd biicode_project | ||
bii cpp:build | ||
ls bin/* | ||
./bin/vitaut_cppformat_biicode_samples_basic | ||
|
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,3 @@ | ||
doc/* | ||
breathe/* | ||
gmock/* |