Optional: Move optional-lite to the include/third-party directory

This fixes the use case of adding the include folder
manually to an outside project.
This commit is contained in:
Paul Hollinsky
2021-04-23 20:01:53 -04:00
parent b7ce9819bd
commit 6c1cbc9db8
44 changed files with 1 additions and 5 deletions
+39
View File
@@ -0,0 +1,39 @@
# Copyright 2014 by Martin Moene
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# optional lite is inspired on std::optional by Fernando Cacciola and
# Andrzej Krzemienski and on expected lite by Martin Moene.
# Usage: gmake [STD=c++03]
PROGRAM = optional-main.t
SOURCES = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
ifdef STD
STD_OPTION = -std=$(STD)
endif
CXX = g++
CXXFLAGS = $(STD_OPTION) -I../include -Wall # -Wextra
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CXX) -o $@ $^
test: $(PROGRAM)
./$(PROGRAM)
test-all: $(PROGRAM)
./$(PROGRAM) @
list: test
./$(PROGRAM) -l
clean:
$(RM) $(OBJECTS)
$(RM) $(PROGRAM)