diff --git a/Makefile.in b/Makefile.in index 6dff3ae..cff8a8a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,7 +3,8 @@ OUT_DIR = bin/ SOURCES = \ test/src/map/main.cpp \ test/src/array/main.cpp \ - test/src/parser/main.cpp + test/src/parser/main.cpp \ + test/src/odr/main.cpp OBJECTS = ${SOURCES:.cpp=.cpp.o} TEST_OBJECTS = $(SOURCES:.cpp=.test) TESTS = $(foreach test,${SOURCES}, $(addprefix ${OUT_DIR}, $(notdir $(test)))) @@ -62,6 +63,11 @@ ${PROJECT}_setup: setup mkdir -p ${OUT_DIR}$(dir $(shell echo $< | sed 's_test/src/__')) > /dev/null ${CXX} ${CXX_FLAGS} $< ${LD_LIBS} -o ${OUT_DIR}$(shell echo "$(shell echo $< | sed 's/\.cpp//')" | sed 's_test/src/__') > /dev/null +test/src/odr/main.cpp.o: ${PROJECT}_setup + echo " Validating ODR" + mkdir -p ${OUT_DIR}$(dir $(shell echo test/src/odr/main.cpp | sed 's_test/src/__')) > /dev/null + ${CXX} ${CXX_FLAGS} test/src/odr/main1.cpp test/src/odr/main2.cpp ${LD_LIBS} -o ${OUT_DIR}$(shell echo "$(shell echo test/src/odr/main.cpp | sed 's/\.cpp//')" | sed 's_test/src/__') > /dev/null + install: export installdir=${DESTDIR}${INCLUDEDIR} && \ export project=${PROJECT} && \ diff --git a/README.md b/README.md index 7b45fd1..6f3b2b8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ it expects valid JSON all of the time. Practice ---- -Assuming the JeayeSON headers are in your search path, simply +Assuming the JeayeSON headers are in your search path, simply ```cpp #include ``` @@ -108,15 +108,15 @@ std::cout << std::endl; ``` ### Installation -The `./configure` script must be used at least once to automagically generate `jeayeson/config.hpp` (see [Customization](https://github.com/jeaye/jeayeson#customization)). Since JeayeSON is a header-only library, simply copy over the contents of `include` to your project, or, better yet, add JeayeSON as a submodule and introduce `jeayeson/include` to your header search paths. +The `./configure` script must be used at least once to automagically generate `jeayeson/config.hpp` (see [Customization](https://github.com/jeaye/jeayeson#customization)). Since JeayeSON is a header-only library, simply copy over the contents of `include` to your project, or, better yet, add JeayeSON as a submodule and introduce `jeayeson/include` to your header search paths -A full installation can also be achieved by using `./configure && make install`. See the `./configure` script for prefix options. +A full installation can also be achieved by using `./configure && make install`. See the `./configure` script for prefix options. Customization --- **NOTE**: All configuration is easily done in `jeayeson/config.hpp`, which is generated when you run `./configure` (and is not overwritten subsequently -- delete it to reset). -Customization can be achieved by adjusting the types in the `jeayeson::config` struct template. A specialization is already provided, which contains the default types used by JeayeSON. Feel free to change the types to any other, still compatible, types. +Customization can be achieved by adjusting the types in the `jeayeson::config` struct template. A specialization is already provided, which contains the default types used by JeayeSON. Feel free to change the types to any other, still compatible, types. For example, you may want the json integer type to be 32bit instead of the default 64bit. Or, you may want to use `std::unordered_map` instead of `std::map`. @@ -131,7 +131,7 @@ $ ./configure && make # Depending on your compiler setup (gcc or clang, linux or osx, etc) # you may need to specify some extra flags. An example case: # (allows clang & libc++ to work on Arch Linux) -$ CXX=clang++ CXX_FLAGS=-stdlib=libc++ LD_LIBS=-lc++abi make +$ CXX=clang++ CXX_FLAGS=-stdlib=libc++ LD_LIBS=-lc++abi make ``` Once built, you can run the tests: ```bash diff --git a/lib/jest b/lib/jest index cd5621c..924f5b4 160000 --- a/lib/jest +++ b/lib/jest @@ -1 +1 @@ -Subproject commit cd5621cb26afbbf4f8b0455ce2378674e79368e3 +Subproject commit 924f5b437621a9ec8472e69c0fe0017c27f091a2 diff --git a/test/src/odr/main1.cpp b/test/src/odr/main1.cpp new file mode 100644 index 0000000..daedff2 --- /dev/null +++ b/test/src/odr/main1.cpp @@ -0,0 +1,17 @@ +/* + Copyright © 2015 Jesse 'Jeaye' Wilkerson + See licensing at: + http://opensource.org/licenses/BSD-3-Clause + + File: test/src/odr/main1.cpp + Author: Jesse 'Jeaye' Wilkerson +*/ + +#include +#include + +int main() +{ + jest::worker const j{}; + return j(); +} diff --git a/test/src/odr/main2.cpp b/test/src/odr/main2.cpp new file mode 100644 index 0000000..81c610e --- /dev/null +++ b/test/src/odr/main2.cpp @@ -0,0 +1,11 @@ +/* + Copyright © 2015 Jesse 'Jeaye' Wilkerson + See licensing at: + http://opensource.org/licenses/BSD-3-Clause + + File: test/src/odr/main2.cpp + Author: Jesse 'Jeaye' Wilkerson +*/ + +#include +#include