Skip to content

Commit b7f5b4b

Browse files
committed
Use cloop cmake build
1 parent 30d835a commit b7f5b4b

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

builds/posix/Makefile.in

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,17 @@ ifeq ($(CLIENT_ONLY_FLG),N)
197197
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/btyacc
198198
endif
199199

200-
CXX="$(CXX)" LD_FLAGS="$(PLATFORM_LDFLAGS)" $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop core
200+
mkdir -p $(GEN_ROOT)/$(TARGET)/cloop
201+
202+
ifeq ($(PLATFORM),DARWIN)
203+
cd $(GEN_ROOT)/$(TARGET)/cloop && \
204+
cmake -DCMAKE_BUILD_TYPE=$(FB_CMAKE_BUILD_TYPE) -DCMAKE_CXX_COMPILER="$(CXX)" -DCLOOP_BUILD_TESTS=OFF $(ROOT)/extern/cloop
205+
else
206+
cd $(GEN_ROOT)/$(TARGET)/cloop && \
207+
cmake -DCMAKE_BUILD_TYPE=$(FB_CMAKE_BUILD_TYPE) -DCMAKE_CXX_COMPILER="$(CXX)" -DCLOOP_BUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="-static-libstdc++" -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++" $(ROOT)/extern/cloop
208+
endif
209+
cd $(GEN_ROOT)/$(TARGET)/cloop && \
210+
cmake --build .
201211

202212
CC="$(CC)" CFLAGS="$(CFLAGS)" AR="$(AR)" $(MAKE) -C $(ROOT)/extern/decNumber
203213
ln -sf $(ROOT)/extern/decNumber/libdecFloat.a $(STATIC_LIB)

builds/posix/make.defaults

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ AR= ar @AR_OPTIONS@
187187
LN= @LN_S@
188188
RANLIB= @RANLIB@
189189
BTYACC=$(ROOT)/extern/btyacc/btyacc
190-
CLOOP=$(GEN_ROOT)/$(TARGET)/cloop/release/bin/cloop
190+
CLOOP=$(GEN_ROOT)/$(TARGET)/cloop/bin/cloop
191191

192192
AR = @AR@
193193
CC = @CC@

builds/win32/gen_helper.nmake

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11

22
all: updateCloopInterfaces
33

4-
CLOOP=$(FB_GEN_DIR)\cloop.exe
5-
CLOOP_DIR=$(FB_ROOT_PATH)\extern\cloop\src\cloop
6-
CLOOP_SRC=$(CLOOP_DIR)\*.cpp
4+
CLOOP=$(FB_GEN_DIR)\$(FB_TARGET_PLATFORM)\cloop\bin\$(FB_CONFIG)\cloop
75

86
IDL_ROOT=$(FB_ROOT_PATH)\src\include\firebird
97
IDL_FILE=$(IDL_ROOT)\FirebirdInterface.idl
@@ -21,23 +19,10 @@ RPL_AWK_SRC=$(MISC)\def_awk.c
2119
RPL_GREP=$(FB_GEN_DIR)\isc_grep.exe
2220
RPL_GREP_SRC=$(MISC)\isc_grep.c
2321
# These utils are platform and build independent, use fixed temporary dir.
24-
UTL_TMP_DIR=$(FB_TEMP_DIR)\Release\misc
25-
26-
CPPFLAGS = /MD /EHsc /O2 /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_CONSOLE"
2722

2823
updateCloopInterfaces: $(API_H_FILE) $(API_PAS_FILE)
2924

3025

31-
$(CLOOP) $(RPL_AWK) $(RPL_GREP): $(UTL_TMP_DIR)
32-
33-
$(UTL_TMP_DIR):
34-
-mkdir $@ 2>nul
35-
36-
$(CLOOP): $(CLOOP_SRC)
37-
$(CPP) $(CPPFLAGS) /Fe$@ /Fo$(UTL_TMP_DIR)\ $(CLOOP_SRC)
38-
39-
$(API_H_FILE) $(API_PAS_FILE): $(CLOOP)
40-
4126
$(API_H_FILE): $(IDL_FILE)
4227
$(CLOOP) $(IDL_FILE) c++ $@ IDL_FB_INTERFACES_H Firebird I
4328

builds/win32/make_boot.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ goto :EOF
205205
:interfaces
206206
@echo.
207207
@echo Building CLOOP and generating interfaces...
208+
@mkdir %FB_GEN_DIR%\%FB_TARGET_PLATFORM%\cloop 2>nul
209+
@pushd %FB_GEN_DIR%\%FB_TARGET_PLATFORM%\cloop
210+
@cmake -G "%MSVC_CMAKE_GENERATOR%" -A %FB_TARGET_PLATFORM% -S %FB_ROOT_PATH%\extern\cloop -DCLOOP_BUILD_TESTS=OFF
211+
if errorlevel 1 call :boot2 interfaces
212+
@cmake --build %FB_GEN_DIR%\%FB_TARGET_PLATFORM%\cloop --target ALL_BUILD --config %FB_CONFIG% > cloop_%FB_CONFIG%_%FB_TARGET_PLATFORM%.log
213+
if errorlevel 1 call :boot2 interfaces
214+
@popd
208215
@nmake /s /x interfaces_%FB_TARGET_PLATFORM%.log /f gen_helper.nmake updateCloopInterfaces
209216
if errorlevel 1 call :boot2 interfaces
210217
goto :EOF

0 commit comments

Comments
 (0)