mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-06 16:56:42 +08:00
Local testing on VC2010 and VC2012.
Also improved the documentation Makefile not to re-generate the samples unless the source Markdown files are newer. This should make samples development easier.
This commit is contained in:
parent
9273051e07
commit
b182e16ec3
20
doc/Makefile
20
doc/Makefile
@ -1,5 +1,7 @@
|
|||||||
SOURCE_MARKDOWN := $(wildcard tutorial/*) $(wildcard demo/*)
|
toexample = ../example/$(notdir $(1:.md=.cc))
|
||||||
SOURCE_CXX := $(SOURCE_MARKDOWN:.md=.cc)
|
|
||||||
|
SOURCE_MARKDOWN := $(wildcard tutorial/*.md) $(wildcard demo/*.md)
|
||||||
|
SOURCE_CXX := $(foreach md,$(SOURCE_MARKDOWN),$(call toexample,$(md)))
|
||||||
|
|
||||||
.PHONY : html
|
.PHONY : html
|
||||||
html :
|
html :
|
||||||
@ -20,15 +22,15 @@ web : examples
|
|||||||
python docs.py --web
|
python docs.py --web
|
||||||
|
|
||||||
.PHONY : examples
|
.PHONY : examples
|
||||||
examples : clean-examples $(SOURCE_CXX)
|
examples : $(SOURCE_CXX)
|
||||||
|
|
||||||
.PHONY : clean-examples
|
define EXAMPLE
|
||||||
clean-examples :
|
$(1) : $(2)
|
||||||
make -C ../example clean
|
python transform.py --o-cxx $(1) $(2)
|
||||||
rm -f ../example/*.cc
|
endef
|
||||||
|
|
||||||
%.cc : %.md
|
$(foreach md,$(SOURCE_MARKDOWN), \
|
||||||
python transform.py --o-cxx ../example/$(notdir $@) $<
|
$(eval $(call EXAMPLE,$(call toexample,$(md)),$(md))))
|
||||||
|
|
||||||
.PHONY : clean
|
.PHONY : clean
|
||||||
clean :
|
clean :
|
||||||
|
|||||||
@ -49,21 +49,14 @@ DEFAULTS := \
|
|||||||
# regular C++11 or C++98 build (no constexpr to_string and no strict
|
# regular C++11 or C++98 build (no constexpr to_string and no strict
|
||||||
# conversions).
|
# conversions).
|
||||||
.PHONY : default
|
.PHONY : default
|
||||||
default :
|
default : examples
|
||||||
make $(DEFAULTS) one-configuration
|
make $(DEFAULTS) one-configuration
|
||||||
|
|
||||||
# Builds all configurations with the system compiler.
|
# Builds all configurations with the system compiler.
|
||||||
.PHONY : default-all
|
.PHONY : default-all
|
||||||
default-all :
|
default-all : examples
|
||||||
make $(DEFAULTS) all-configurations
|
make $(DEFAULTS) all-configurations
|
||||||
|
|
||||||
# Re-generates the examples from the Markdown, and then builds all
|
|
||||||
# configurations with the system compiler. Should be done before a pull request,
|
|
||||||
# but not practical for regular use because it touches dependencies and causes
|
|
||||||
# full rebuilds.
|
|
||||||
.PHONY : default-thorough
|
|
||||||
default-thorough : examples default-all
|
|
||||||
|
|
||||||
.PHONY : examples
|
.PHONY : examples
|
||||||
examples :
|
examples :
|
||||||
make -C ../doc examples
|
make -C ../doc examples
|
||||||
@ -137,7 +130,7 @@ all-configurations :
|
|||||||
one-configuration
|
one-configuration
|
||||||
|
|
||||||
.PHONY : all-unix
|
.PHONY : all-unix
|
||||||
all-unix :
|
all-unix : examples
|
||||||
make COMPILER=clang++36 unix
|
make COMPILER=clang++36 unix
|
||||||
make COMPILER=g++51 unix
|
make COMPILER=g++51 unix
|
||||||
make COMPILER=g++46 unix
|
make COMPILER=g++46 unix
|
||||||
@ -152,9 +145,11 @@ all-unix :
|
|||||||
make COMPILER=clang++35 unix
|
make COMPILER=clang++35 unix
|
||||||
|
|
||||||
.PHONY : all-ms
|
.PHONY : all-ms
|
||||||
all-ms :
|
all-ms : examples
|
||||||
make TITLE=vc2015 COMPILER="Visual Studio 14 2015" ms
|
make TITLE=vc2015 COMPILER="Visual Studio 14 2015" ms
|
||||||
make TITLE=vc2008 COMPILER="Visual Studio 9 2008" ms
|
make TITLE=vc2008 COMPILER="Visual Studio 9 2008" ms
|
||||||
|
make TITLE=vc2010 COMPILER="Visual Studio 10 2010" ms
|
||||||
|
make TITLE=vc2012 COMPILER="Visual Studio 11 2012" ms
|
||||||
make TITLE=vc2013 COMPILER="Visual Studio 12 2013" ms
|
make TITLE=vc2013 COMPILER="Visual Studio 12 2013" ms
|
||||||
|
|
||||||
$(CXXTEST_GENERATED) : cxxtest/*.h
|
$(CXXTEST_GENERATED) : cxxtest/*.h
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user