Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add functionality to install needed header files #145

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {
artifactNumToKeepStr: "100"
)
)
timeout(time: 3, unit: 'HOURS')
timeout(time: 5, unit: 'HOURS')
disableConcurrentBuilds()
}
environment {
Expand All @@ -30,8 +30,11 @@ pipeline {
retry(count: 2) {
dir('discotec-spack') {
sh '''
git -C spack pull || git clone git@github.com:spack/spack.git
echo "SPACK_USER_CACHE_PATH: ${SPACK_USER_CACHE_PATH}"
git clone git@github.com:spack/spack.git || true
cd spack
# use old spack release version
git checkout v0.21.3
# reset compilers and external packages due to possible different systems
rm -f ~/.spack/bootstrap/config/packages.yaml
rm -f ~/.spack/linux/compilers.yaml
Expand Down Expand Up @@ -71,7 +74,6 @@ pipeline {
stage('build dependencies w/ spack') {
steps {
withEnv(['SPACK_USER_CACHE_PATH=$TMP/spack/','SPACK_DISABLE_LOCAL_CONFIG=true']) {

retry(count: 2) {
dir('discotec-spack/spack') {
sh '''
Expand All @@ -85,7 +87,7 @@ pipeline {
# spack install zlib
# spack load zlib
spack spec -y discotec@main -lto %${compiler} ^${mpiimpl} # +selalib # --only dependencies # actually build discotec, such that load command will work
spack install -y discotec@main -lto %${compiler} ^${mpiimpl} # +selalib # --only dependencies # actually build discotec, such that load command will work
spack --debug install -y discotec@main -lto %${compiler} ^${mpiimpl} # +selalib # --only dependencies # actually build discotec, such that load command will work
spack install -y lz4 %${compiler}
'''
}
Expand Down
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,16 @@ endif()
# target_compile_options(discotec PUBLIC $<$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>:-mmic>)
#endif()

file(GLOB_RECURSE DISCOTEC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp) #TODO: @freifrauvonbleifrei: which files should be included? Do we keep the same structure as in the sources?

message(STATUS "DisCoTec headers: ${DISCOTEC_HEADERS}")

set_target_properties(discotec PROPERTIES PUBLIC_HEADER "${DISCOTEC_HEADERS}")

install(TARGETS discotec
EXPORT discotecTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
PUBLIC_HEADER DESTINATION include
)