Skip to content

Commit

Permalink
Update OSS scan package generation.
Browse files Browse the repository at this point in the history
Signed-off-by: Rule Timothy (VM/EMT3) <[email protected]>
  • Loading branch information
timrulebosch committed Jan 31, 2024
1 parent 6165b45 commit 3c35527
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

###############
## Docker Images.
GCC_BUILDER_IMAGE ?= gcc-builder:latest
GCC_TESTER_IMAGE ?= python-builder:latest
GCC_BUILDER_IMAGE ?= ghcr.io/boschglobal/dse-gcc-builder:main
GCC_TESTER_IMAGE ?= ghcr.io/boschglobal/dse-python-builder:main
DOCKER_DIRS = simbus-sa modelc modelc-x86


Expand Down Expand Up @@ -160,8 +160,6 @@ cleanall:

oss:
@${DOCKER_BUILDER_CMD} $(MAKE) do-oss
mkdir -p $(OSS_DIR)
cp -r $(EXTERNAL_BUILD_DIR)/* $(OSS_DIR)

do-build:
@for d in $(SUBDIRS); do ($(MAKE) -C $$d build ); done
Expand Down
37 changes: 33 additions & 4 deletions extra/external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ add_compile_options(-Wall -W -Wwrite-strings -Wno-missing-field-initializers)
# Load URLs
# =========
include(oss_repos.cmake)
include($ENV{REPO_MIRRORS} OPTIONAL)
if($ENV{REPO_MIRRORS})
include($ENV{REPO_MIRRORS} OPTIONAL)
endif()



Expand All @@ -29,6 +31,17 @@ set_property(DIRECTORY PROPERTY EP_STEP_TARGETS download)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")


# DSE C Lib
# ---------
include(FetchContent)
FetchContent_Declare(dse_clib
URL $ENV{DSE_CLIB_URL}
HTTP_USERNAME $ENV{DSE_CLIB_URL_USER}
HTTP_PASSWORD $ENV{DSE_CLIB_URL_TOKEN}
SOURCE_DIR "$ENV{EXTERNAL_BUILD_DIR}/dse.clib"
)
FetchContent_MakeAvailable(dse_clib)

# DSE Network Codec
# -----------------
ExternalProject_Add(dse_ncodec
Expand Down Expand Up @@ -139,11 +152,27 @@ ExternalProject_Add(dlfcnwin32
# OSS Target
# ==========
add_custom_target(oss)
function(oss_copy src dst)
add_custom_command(TARGET oss PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${src}"
"../../../dse/__oss__/${dst}"
)
endfunction()
add_dependencies(oss
dlfcnwin32-download
dse_ncodec-download
event-download
yaml-download
msgpackc-download
hiredis-download
dlfcnwin32-download
msgpackc-download
yaml-download
)
oss_copy(${dse_clib_SOURCE_DIR} dse.clib)


oss_copy($ENV{EXTERNAL_BUILD_DIR}/dlfcnwin32 dlfcnwin32)
oss_copy($ENV{EXTERNAL_BUILD_DIR}/dse_ncodec dse_ncodec)
oss_copy($ENV{EXTERNAL_BUILD_DIR}/event event)
oss_copy($ENV{EXTERNAL_BUILD_DIR}/hiredis hiredis)
oss_copy($ENV{EXTERNAL_BUILD_DIR}/msgpackc msgpackc)
oss_copy($ENV{EXTERNAL_BUILD_DIR}/yaml yaml)
1 change: 0 additions & 1 deletion extra/external/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ build:

oss:
if [ ! -d "build" ]; then make setup; fi
cd build; cmake -DCMAKE_TOOLCHAIN_FILE=$(CMAKE_TOOLCHAIN_FILE) ..
cd build; make oss

clean:
Expand Down

0 comments on commit 3c35527

Please sign in to comment.