Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MLIP
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
Tadah
MLIP
Commits
7a7f7e09
Commit
7a7f7e09
authored
4 months ago
by
mkirsz
Browse files
Options
Downloads
Patches
Plain Diff
Build update
parent
edaac214
No related branches found
Branches containing commit
No related tags found
1 merge request
!14
Develop
Pipeline
#48649
failed
4 months ago
Stage: build.debug
Stage: run.unit.tests
Stage: build_release
Stage: trigger
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+29
-29
29 additions, 29 deletions
CMakeLists.txt
with
29 additions
and
29 deletions
CMakeLists.txt
+
29
−
29
View file @
7a7f7e09
...
@@ -7,8 +7,8 @@ project(Tadah.MLIP)
...
@@ -7,8 +7,8 @@ project(Tadah.MLIP)
get_filename_component
(
MODULE_TEST
${
CMAKE_BINARY_DIR
}
NAME
)
get_filename_component
(
MODULE_TEST
${
CMAKE_BINARY_DIR
}
NAME
)
if
(
${
CMAKE_SOURCE_DIR
}
STREQUAL
${
CMAKE_BINARY_DIR
}
if
(
${
CMAKE_SOURCE_DIR
}
STREQUAL
${
CMAKE_BINARY_DIR
}
OR
${
MODULE_TEST
}
STREQUAL
"MLIP"
OR
${
MODULE_TEST
}
STREQUAL
"MLIP"
)
)
message
(
FATAL_ERROR
"
message
(
FATAL_ERROR
"
In-source builds not allowed.
In-source builds not allowed.
Please make a new directory (called a build directory) and run CMake from there.
Please make a new directory (called a build directory) and run CMake from there.
You may need to remove CMakeCache.txt and CMakeFiles dir. "
)
You may need to remove CMakeCache.txt and CMakeFiles dir. "
)
...
@@ -19,39 +19,39 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
...
@@ -19,39 +19,39 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set
(
CMAKE_CXX_EXTENSIONS OFF
)
set
(
CMAKE_CXX_EXTENSIONS OFF
)
if
(
BUILD_SHARED_LIBS
)
if
(
BUILD_SHARED_LIBS
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON
)
endif
()
endif
()
if
(
BUILD_SHARED_LIBS
)
if
(
BUILD_SHARED_LIBS
)
# Always full RPATH
# Always full RPATH
# use, i.e. don't skip the full RPATH for the build tree
# use, i.e. don't skip the full RPATH for the build tree
set
(
CMAKE_SKIP_BUILD_RPATH FALSE
)
set
(
CMAKE_SKIP_BUILD_RPATH FALSE
)
# when building, don't use the install RPATH already
# when building, don't use the install RPATH already
# (but later on when installing)
# (but later on when installing)
set
(
CMAKE_BUILD_WITH_INSTALL_RPATH FALSE
)
set
(
CMAKE_BUILD_WITH_INSTALL_RPATH FALSE
)
set
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
set
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
# add the automatically determined parts of the RPATH
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
# which point to directories outside the build tree to the install RPATH
set
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE
)
set
(
CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE
)
# the RPATH to be used when installing, but only if it's not a system directory
# the RPATH to be used when installing, but only if it's not a system directory
list
(
FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
isSystemDir
)
list
(
FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
isSystemDir
)
if
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
if
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
set
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
set
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_PREFIX
}
/lib"
)
endif
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
endif
(
"
${
isSystemDir
}
"
STREQUAL
"-1"
)
endif
()
endif
()
include
(
FetchContent
)
include
(
FetchContent
)
if
(
DEFINED ENV{CI_COMMIT_REF_NAME}
)
if
(
DEFINED ENV{CI_COMMIT_REF_NAME}
)
set
(
GIT_BRANCH
"$ENV{CI_COMMIT_REF_NAME}"
)
set
(
GIT_BRANCH
"$ENV{CI_COMMIT_REF_NAME}"
)
elseif
(
DEFINED ENV{READTHEDOCS}
)
elseif
(
DEFINED ENV{READTHEDOCS}
)
set
(
GIT_BRANCH
"$ENV{READTHEDOCS_
PROJECT
}"
)
set
(
GIT_BRANCH
"$ENV{READTHEDOCS_
VERSION
}"
)
else
()
else
()
execute_process
(
execute_process
(
COMMAND git rev-parse --symbolic-full-name --abbrev-ref HEAD
COMMAND git rev-parse --symbolic-full-name --abbrev-ref HEAD
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_VARIABLE GIT_BRANCH
...
@@ -63,7 +63,7 @@ FetchContent_Declare(
...
@@ -63,7 +63,7 @@ FetchContent_Declare(
Tadah.MODELS
Tadah.MODELS
GIT_REPOSITORY https://git.ecdf.ed.ac.uk/tadah/models.git
GIT_REPOSITORY https://git.ecdf.ed.ac.uk/tadah/models.git
GIT_TAG origin/
${
GIT_BRANCH
}
GIT_TAG origin/
${
GIT_BRANCH
}
)
)
FetchContent_MakeAvailable
(
Tadah.MODELS
)
FetchContent_MakeAvailable
(
Tadah.MODELS
)
...
@@ -78,20 +78,20 @@ target_include_directories(tadah.mlip PUBLIC ${Tadah.CORE_SOURCE_DIR}/include)
...
@@ -78,20 +78,20 @@ target_include_directories(tadah.mlip PUBLIC ${Tadah.CORE_SOURCE_DIR}/include)
target_include_directories
(
tadah.mlip PUBLIC
${
Tadah.CORE_SOURCE_DIR
}
/external/toml11
)
target_include_directories
(
tadah.mlip PUBLIC
${
Tadah.CORE_SOURCE_DIR
}
/external/toml11
)
if
(
TADAH_ENABLE_OPENMP
)
if
(
TADAH_ENABLE_OPENMP
)
find_package
(
OpenMP REQUIRED
)
find_package
(
OpenMP REQUIRED
)
target_link_libraries
(
tadah.mlip PUBLIC OpenMP::OpenMP_CXX
)
target_link_libraries
(
tadah.mlip PUBLIC OpenMP::OpenMP_CXX
)
endif
()
endif
()
if
(
TADAH_BUILD_MPI
)
if
(
TADAH_BUILD_MPI
)
find_package
(
MPI REQUIRED
)
find_package
(
MPI REQUIRED
)
target_link_libraries
(
tadah.mlip PUBLIC MPI::MPI_CXX
)
target_link_libraries
(
tadah.mlip PUBLIC MPI::MPI_CXX
)
add_compile_definitions
(
TADAH_BUILD_MPI
)
add_compile_definitions
(
TADAH_BUILD_MPI
)
endif
()
endif
()
if
(
TADAH_BUILD_TESTS
)
if
(
TADAH_BUILD_TESTS
)
include
(
CTest
)
include
(
CTest
)
add_subdirectory
(
tests
)
add_subdirectory
(
tests
)
endif
()
endif
()
# Installation rules
# Installation rules
...
...
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