Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
csg-eb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
exa
csg-eb
Commits
b7563a5a
Commit
b7563a5a
authored
3 years ago
by
Mark Meredith
Browse files
Options
Downloads
Patches
Plain Diff
Build with GNU Makefile
parent
f170819a
No related branches found
Branches containing commit
No related tags found
1 merge request
!110
Build with GNU Makefile
Pipeline
#29616
passed
3 years ago
Stage: build-img
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+36
-4
36 additions, 4 deletions
.gitlab-ci.yml
GNUmakefile
+62
-0
62 additions, 0 deletions
GNUmakefile
with
98 additions
and
4 deletions
.gitlab-ci.yml
+
36
−
4
View file @
b7563a5a
...
@@ -24,7 +24,10 @@ build-img:
...
@@ -24,7 +24,10 @@ build-img:
needs
:
[
'
build-img'
]
needs
:
[
'
build-img'
]
script
:
script
:
-
conan install -if build -g cmake_find_package catch2/2.13.7@
-
conan install -if build -g cmake_find_package catch2/2.13.7@
-
if [ "$ENABLE_CSG" == "ON" ]; then conan install -if build -g cmake_find_package cgal/5.2.1@; fi
-
|
if [ "$ENABLE_CGAL" == "ON" ]; then
conan install -if build -g cmake_find_package cgal/5.2.1@
fi
-
conan install -if build -g cmake_find_package taocpp-pegtl/3.2.1@
-
conan install -if build -g cmake_find_package taocpp-pegtl/3.2.1@
-
cmake -S.
-
cmake -S.
...
@@ -32,7 +35,7 @@ build-img:
...
@@ -32,7 +35,7 @@ build-img:
-GNinja
-GNinja
-DCMAKE_MODULE_PATH=$PWD/build
-DCMAKE_MODULE_PATH=$PWD/build
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_TYPE=Debug
-DCSG_CGAL_ENABLED=${ENABLE_C
S
G}
-DCSG_CGAL_ENABLED=${ENABLE_CG
AL
}
-
cmake --build build --target unit_tests_csg
-
cmake --build build --target unit_tests_csg
-
cd build
-
cd build
-
ctest
-
ctest
...
@@ -41,12 +44,12 @@ build-img:
...
@@ -41,12 +44,12 @@ build-img:
test:cgal
:
test:cgal
:
variables
:
variables
:
ENABLE_C
S
G
:
"
ON"
ENABLE_CG
AL
:
"
ON"
<<
:
*cmake_def
<<
:
*cmake_def
test:no_cgal
:
test:no_cgal
:
variables
:
variables
:
ENABLE_C
S
G
:
"
OFF"
ENABLE_CG
AL
:
"
OFF"
<<
:
*cmake_def
<<
:
*cmake_def
.test:spack
:
&spack_def
.test:spack
:
&spack_def
...
@@ -69,3 +72,32 @@ spack:no_cgal:
...
@@ -69,3 +72,32 @@ spack:no_cgal:
variables
:
variables
:
NO_CSG
:
"
~cgal"
NO_CSG
:
"
~cgal"
<<
:
*spack_def
<<
:
*spack_def
.test:gnumake
:
&gnumake_def
stage
:
test
variables
:
BUILD
:
${CI_PROJECT_DIR}/build
BOOST_HOME
:
${BUILD}/boost
CATCH2_HOME
:
${BUILD}/catch2
CGAL_HOME
:
${BUILD}/cgal
PEGTL_HOME
:
${BUILD}/taocpp-pegtl
image
:
$CI_REGISTRY_IMAGE:latest
needs
:
[
'
build-img'
]
script
:
-
conan install -if build -g deploy catch2/2.13.7@
-
|
if [ "$ENABLE_CGAL" == "ON" ]; then
conan install -if build -g deploy cgal/5.2.1@
fi
-
conan install -if build -g deploy taocpp-pegtl/3.2.1@
-
make install DESTDIR=the_destination
tags
:
-
docker
gnumake:cgal
:
variables
:
ENABLE_CGAL
:
"
ON"
<<
:
*gnumake_def
gnumake:no_cgal
:
<<
:
*gnumake_def
This diff is collapsed.
Click to expand it.
GNUmakefile
0 → 100644
+
62
−
0
View file @
b7563a5a
###
### Makefile for building libcsgeb.a with GNU Make.
### Only works with GCC compiler
### Expects to find paths for dependencies defined in: BOOST_HOME, CATCH2_HOME, CGAL_HOME, PEGTL_HOME
###
TARGET
?=
libcsgeb.a
BUILD_DIR
?=
./build
SRCFILENAMES
:=
csg.cpp
\
levelset_2d.cpp
\
levelset_3d.cpp
\
matrix_functions.cpp
\
parser.cpp
\
exception.cpp
\
$(
if
$(
ENABLE_CGAL
)
,cgal_helper_polygon.cpp,
)
\
$(
if
$(
ENABLE_CGAL
)
,cgal_helper_polyhedron.cpp,
)
SRCS
:=
$(
SRCFILENAMES:%
=
./src/csg/%
)
OBJS
:=
$(
SRCS:%
=
$(
BUILD_DIR
)
/%.o
)
DEPS
:=
$(
OBJS:.o
=
.d
)
INC_DIRS
:=
src include
INC_DIRS
+=
$(
BOOST_HOME
)
/include
INC_DIRS
+=
$(
CATCH2_HOME
)
/include
INC_DIRS
+=
$(
CGAL_HOME
)
/include
INC_DIRS
+=
$(
PEGTL_HOME
)
/include
INC_FLAGS
:=
$(
addprefix
-I
,
$(
INC_DIRS
))
CPPFLAGS
?=
$(
INC_FLAGS
)
-MMD
-MP
ifdef
$(ENABLE_CGAL)
CPPFLAGS
+=
-DUSE_CGAL
endif
$(TARGET)
:
$(OBJS)
@
ar rcs
$(
TARGET
)
$(
OBJS
)
$(BUILD_DIR)/$(TARGET)
:
$(OBJS)
$(
CXX
)
$(
OBJS
)
-o
$@
$(
LDFLAGS
)
$(BUILD_DIR)/%.cpp.o
:
%.cpp
$(
MKDIR_P
)
$(
dir
$@
)
$(
CXX
)
$(
CPPFLAGS
)
$(
CXXFLAGS
)
-std
=
c++17
-c
$<
-o
$@
.PHONY
:
install
install
:
$(TARGET)
@$(
MKDIR_P
)
$(
DESTDIR
)
/lib
$(
DESTDIR
)
/include
install
-m
0755
$<
$(
DESTDIR
)
/lib
install
-m
0755 include/
*
.hpp
$(
DESTDIR
)
/include
.PHONY
:
clean
clean
:
$(
RM
)
-r
$(
BUILD_DIR
)
-include
$(DEPS)
MKDIR_P
?=
mkdir
-p
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment