Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
40472dbd
Commit
40472dbd
authored
9 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
Task 9048: Added comments
parent
1e106d3f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Docker/CMakeLists.txt
+19
-5
19 additions, 5 deletions
Docker/CMakeLists.txt
with
19 additions
and
5 deletions
Docker/CMakeLists.txt
+
19
−
5
View file @
40472dbd
...
@@ -5,20 +5,32 @@ lofar_package(Docker 1.0)
...
@@ -5,20 +5,32 @@ lofar_package(Docker 1.0)
include
(
LofarFindPackage
)
include
(
LofarFindPackage
)
lofar_find_package
(
Subversion REQUIRED
)
lofar_find_package
(
Subversion REQUIRED
)
# Create our template engine, using build-specific info
#
configure_file
(
# For given directories, we generate the Dockerfile
${
CMAKE_CURRENT_SOURCE_DIR
}
/template.in
# by parsing their Dockerfile.tmpl through "template".
${
CMAKE_CURRENT_BINARY_DIR
}
/template @ONLY
)
#
# "template" is a script that fills in variables with
# respect to the build info (branch name, build time, etc)
#
# Directories with Dockerfile.tmpl to parse
# Directories with Dockerfile.tmpl to parse
set
(
DOCKER_TEMPLATE_DIRS
set
(
DOCKER_TEMPLATE_DIRS
lofar-pipeline
lofar-pipeline
lofar-outputproc
)
lofar-outputproc
)
# Create our template engine, using build-specific info
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/template.in
${
CMAKE_CURRENT_BINARY_DIR
}
/template @ONLY
)
# Convert Dockerfile.tmpl -> Dockerfile in ${DOCKER_TEMPLATE_DIRS}
# Convert Dockerfile.tmpl -> Dockerfile in ${DOCKER_TEMPLATE_DIRS}
foreach
(
_dir
${
DOCKER_TEMPLATE_DIRS
}
)
foreach
(
_dir
${
DOCKER_TEMPLATE_DIRS
}
)
# _src -> _dst
set
(
_src
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
_dir
}
/Dockerfile.tmpl
)
set
(
_src
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
_dir
}
/Dockerfile.tmpl
)
set
(
_dst
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
_dir
}
_Dockerfile
)
set
(
_dst
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
_dir
}
_Dockerfile
)
# add generating command, and (any) target to force the generation
# when "all" is build.
add_custom_command
(
add_custom_command
(
OUTPUT
${
_dst
}
OUTPUT
${
_dst
}
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/template <
${
_src
}
>
${
_dst
}
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/template <
${
_src
}
>
${
_dst
}
...
@@ -26,6 +38,7 @@ foreach(_dir ${DOCKER_TEMPLATE_DIRS})
...
@@ -26,6 +38,7 @@ foreach(_dir ${DOCKER_TEMPLATE_DIRS})
)
)
add_custom_target
(
${
_dir
}
_Dockerfile_target ALL DEPENDS
${
_dst
}
)
add_custom_target
(
${
_dir
}
_Dockerfile_target ALL DEPENDS
${
_dst
}
)
# install resulting Dockerfile
install
(
FILES
install
(
FILES
${
_dst
}
${
_dst
}
DESTINATION share/docker/
${
_dir
}
DESTINATION share/docker/
${
_dir
}
...
@@ -33,10 +46,11 @@ foreach(_dir ${DOCKER_TEMPLATE_DIRS})
...
@@ -33,10 +46,11 @@ foreach(_dir ${DOCKER_TEMPLATE_DIRS})
)
)
endforeach
()
endforeach
()
# Install everything
# Install everything
else
install
(
DIRECTORY
install
(
DIRECTORY
lofar-base
lofar-base
lofar-pipeline
lofar-pipeline
lofar-outputproc
lofar-outputproc
DESTINATION share/docker
DESTINATION share/docker
PATTERN Dockerfile.tmpl EXCLUDE
)
PATTERN Dockerfile.tmpl EXCLUDE
)
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