mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57:46 +00:00
Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
This commit is contained in:
parent
49727ffee4
commit
450a2a0f9c
236 changed files with 1774 additions and 2337 deletions
|
@ -1,5 +0,0 @@
|
|||
install:
|
||||
mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/AK/
|
||||
cp ../AK/*.h $(SERENITY_BASE_DIR)/Root/usr/include/AK/
|
||||
|
||||
include ../Makefile.common
|
12
AK/Tests/CMakeLists.txt
Normal file
12
AK/Tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
file(GLOB AK_TEST_SOURCES "*.cpp")
|
||||
|
||||
foreach(source ${AK_TEST_SOURCES})
|
||||
get_filename_component(name ${source} NAME_WE)
|
||||
add_executable(${name} ${source})
|
||||
target_link_libraries(${name} LagomCore)
|
||||
add_test(
|
||||
NAME ${name}
|
||||
COMMAND ${name}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endforeach()
|
|
@ -1,37 +0,0 @@
|
|||
SHARED_TEST_SOURCES = \
|
||||
../String.cpp \
|
||||
../StringImpl.cpp \
|
||||
../StringBuilder.cpp \
|
||||
../StringView.cpp \
|
||||
../StringUtils.cpp \
|
||||
../LogStream.cpp \
|
||||
../JsonValue.cpp \
|
||||
../JsonParser.cpp \
|
||||
../FlyString.cpp \
|
||||
../FileSystemPath.cpp \
|
||||
../URL.cpp \
|
||||
../Utf8View.cpp
|
||||
|
||||
SRCS = $(wildcard *.cpp)
|
||||
SHARED_TEST_OBJS = ${SHARED_TEST_SOURCES:.cpp=.host.o}
|
||||
OBJS = ${SRCS:.cpp=.host.o} $(SHARED_TEST_OBJS)
|
||||
APPS = ${SRCS:.cpp=}
|
||||
|
||||
EXTRA_CLEAN = $(APPS) *.o ../*.host.o
|
||||
|
||||
USE_HOST_CXX = 1
|
||||
|
||||
include ../../Makefile.common
|
||||
|
||||
CXXFLAGS = -std=c++17 -Wall -Wextra -ggdb3 -O2 -I../ -I../../
|
||||
|
||||
APPS_RUN = $(addsuffix .run,$(APPS))
|
||||
test: $(APPS) $(APPS_RUN)
|
||||
$(APPS_RUN): %.run:
|
||||
./$*
|
||||
|
||||
$(APPS): %: %$(OBJ_SUFFIX).o $(SHARED_TEST_OBJS)
|
||||
@echo "LINK $@"
|
||||
$(QUIET) $(CXX) -o $@ $< $(SHARED_TEST_OBJS) $(LDFLAGS)
|
||||
|
||||
all: | $(APPS) $(APPS_RUN)
|
Loading…
Add table
Add a link
Reference in a new issue