Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GeoModel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue 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
GeoModelDev
GeoModel
Commits
260a5fce
Commit
260a5fce
authored
4 years ago
by
Riccardo Maria Bianchi
Browse files
Options
Downloads
Patches
Plain Diff
Modified CMake code to be 3.10 compliant, because Ubuntu 18 ships 3.10 by default (apt)
parent
d27a2f40
No related branches found
No related tags found
1 merge request
!2
CI: set Ubuntu and macOS pipelines for the new monorepo
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+17
-1
17 additions, 1 deletion
CMakeLists.txt
with
17 additions
and
1 deletion
CMakeLists.txt
+
17
−
1
View file @
260a5fce
...
...
@@ -66,11 +66,27 @@ if(GEOMODEL_BUILD_GEOMODELG4 OR GEOMODEL_BUILD_EXAMPLES_W_GEANT4)
endif
()
# A function to get a string with comma-separated package names from a list of packages
# NOTE: We could make use of list(JOIN ...) on CMake >= 3.12,
# but Ubuntu 18 pat package installs 3.10 instead
function
(
getCSVStringFromList inputList outputString
)
message
(
"input:
${
inputList
}
"
)
set
(
tempList
""
)
foreach
(
item
${
inputList
}
)
list
(
APPEND tempList
${
item
}
)
endforeach
()
string
(
REPLACE
";"
", "
outStr
"
${
tempList
}
"
)
message
(
"string:
${
outStr
}
"
)
set
(
${
outputString
}
${
outStr
}
PARENT_SCOPE
)
endfunction
()
# Let the users know which and how many packages they are building
list
(
LENGTH BUILT_PACKAGES BUILT_PACKAGES_LENGTH
)
list
(
JOIN BUILT_PACKAGES
", "
BUILT_PACKAGES_STR
)
#
# list(JOIN BUILT_PACKAGES ", " BUILT_PACKAGES_STR) # list(JOIN) needs /CMake 3.12, which is missing on Ubuntu 18 by default
getCSVStringFromList
(
"
${
BUILT_PACKAGES
}
"
BUILT_PACKAGES_STR
)
#
message
(
STATUS
"
${
BoldWhite
}
-----
${
ColourReset
}
"
)
message
(
STATUS
"
${
BoldGreen
}
Building the following
${
BUILT_PACKAGES_LENGTH
}
packages:
${
BUILT_PACKAGES_STR
}${
ColourReset
}
"
)
message
(
STATUS
"
${
BoldWhite
}
-----
${
ColourReset
}
"
)
...
...
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