Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
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
Container Registry
Model registry
Operate
Environments
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
multiscale
lammps
Commits
635383c0
Commit
635383c0
authored
6 years ago
by
Christoph Junghans
Browse files
Options
Downloads
Patches
Plain Diff
cmake: cache check for installed packages
parent
a001f2c2
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
cmake/CMakeLists.txt
+14
-7
14 additions, 7 deletions
cmake/CMakeLists.txt
with
14 additions
and
7 deletions
cmake/CMakeLists.txt
+
14
−
7
View file @
635383c0
...
...
@@ -23,14 +23,21 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
set
(
CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE
)
endif
(
NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS
)
file
(
GLOB SRC_FILES
${
LAMMPS_SOURCE_DIR
}
/*.cpp
)
list
(
SORT SRC_FILES
)
# check for files installed by make-based buildsystem
file
(
GLOB SRC_STYLE_FILES
${
LAMMPS_SOURCE_DIR
}
/*/*.cpp
)
foreach
(
_SRC SRC_STYLE_FILES
)
get_filename_component
(
FILENAME
"
${
_SRC
}
"
NAME
)
if
(
EXISTS
${
LAMMPS_SOURCE_DIR
}
/
${
FILENAME
}
)
message
(
FATAL_ERROR
"Found packages installed by the make-based buildsystem, please run 'make -C
${
LAMMPS_SOURCE_DIR
}
no-all purge'"
)
endif
()
endforeach
()
# only run this time consuming check if there are new files
if
(
NOT SRC_FILES STREQUAL SRC_FILES_CACHED
)
file
(
GLOB SRC_PKG_FILES
${
LAMMPS_SOURCE_DIR
}
/*/*.cpp
)
message
(
STATUS
"Running check for installed package (this might take a while)"
)
foreach
(
_SRC SRC_PKG_FILES
)
get_filename_component
(
FILENAME
"
${
_SRC
}
"
NAME
)
if
(
EXISTS
${
LAMMPS_SOURCE_DIR
}
/
${
FILENAME
}
)
message
(
FATAL_ERROR
"Found packages installed by the make-based buildsystem, please run 'make -C
${
LAMMPS_SOURCE_DIR
}
no-all purge'"
)
endif
()
endforeach
()
set
(
SRC_FILES_CACHED
"
${
SRC_FILES
}
"
CACHE INTERNAL
"List of file in LAMMPS_SOURCE_DIR"
FORCE
)
endif
()
enable_language
(
CXX
)
...
...
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