Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Chaofan Chen
ogs
Commits
9be2fe43
Unverified
Commit
9be2fe43
authored
5 months ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
[cmake] Simplified ProcessLib setup.
parent
085587e9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ProcessLib/CMakeLists.txt
+20
-39
20 additions, 39 deletions
ProcessLib/CMakeLists.txt
with
20 additions
and
39 deletions
ProcessLib/CMakeLists.txt
+
20
−
39
View file @
9be2fe43
...
@@ -2,27 +2,17 @@
...
@@ -2,27 +2,17 @@
add_library
(
Processes INTERFACE
)
add_library
(
Processes INTERFACE
)
# Check whether LIE processes are enabled
# Check whether LIE processes are enabled
function
(
check_enabled_processes_for_LIE contains_LIE
)
foreach
(
process
${
_enabled_processes
}
)
set
(
${
contains_hm_process
}
FALSE PARENT_SCOPE
)
if
(
process STREQUAL
"LIE_M"
OR process STREQUAL
"LIE_HM"
)
foreach
(
process
${
_enabled_processes
}
)
add_subdirectory
(
LIE/Common
)
if
(
process STREQUAL
"LIE_M"
break
()
OR process STREQUAL
"LIE_HM"
endif
()
)
endforeach
()
set
(
${
contains_LIE
}
TRUE PARENT_SCOPE
)
return
()
endif
()
endforeach
()
endfunction
()
check_enabled_processes_for_LIE
(
contains_LIE
)
if
(
contains_LIE
)
add_subdirectory
(
LIE/Common
)
endif
()
foreach
(
process
${
_enabled_processes
}
)
foreach
(
process
${
_enabled_processes
}
)
if
(
process STREQUAL
"LIE_HM"
)
if
(
process STREQUAL
"LIE_HM"
)
add_subdirectory
(
LIE/HydroMechanics
)
add_subdirectory
(
LIE/HydroMechanics
)
elseif
(
process STREQUAL
"LIE_M"
)
elseif
(
process STREQUAL
"LIE_M"
)
add_subdirectory
(
LIE/SmallDeformation
)
add_subdirectory
(
LIE/SmallDeformation
)
else
()
else
()
add_subdirectory
(
${
process
}
)
add_subdirectory
(
${
process
}
)
...
@@ -43,27 +33,18 @@ append_source_files(SOURCES Utils)
...
@@ -43,27 +33,18 @@ append_source_files(SOURCES Utils)
append_source_files
(
SOURCES Reflection
)
append_source_files
(
SOURCES Reflection
)
append_source_files
(
SOURCES Graph
)
append_source_files
(
SOURCES Graph
)
# For processes that contains both hydraulical process and mechanical process
# For processes that contains both hydraulical process and mechanical process
# Define a function to check if enabled_processes contains LIE, HydroMechanics,
foreach
(
process
${
_enabled_processes
}
)
# ThermoHydroMechanics, RichardsMechanics, or ThermoRichardsMechanics
if
(
process STREQUAL
"LIE_HM"
function
(
check_enabled_processes contains_hm_process
)
OR process STREQUAL
"HydroMechanics"
set
(
${
contains_hm_process
}
FALSE PARENT_SCOPE
)
OR process STREQUAL
"ThermoHydroMechanics"
foreach
(
process
${
_enabled_processes
}
)
OR process STREQUAL
"RichardsMechanics"
if
(
process STREQUAL
"LIE_HM"
OR process STREQUAL
"TH2M"
OR process STREQUAL
"HydroMechanics"
OR process STREQUAL
"ThermoRichardsMechanics"
OR process STREQUAL
"ThermoHydroMechanics"
)
OR process STREQUAL
"RichardsMechanics"
append_source_files
(
SOURCES Common/HydroMechanics
)
OR process STREQUAL
"TH2M"
break
()
OR process STREQUAL
"ThermoRichardsMechanics"
endif
()
)
endforeach
()
set
(
${
contains_hm_process
}
TRUE PARENT_SCOPE
)
return
()
endif
()
endforeach
()
endfunction
()
check_enabled_processes
(
contains_hm_process
)
if
(
contains_hm_process
)
append_source_files
(
SOURCES Common/HydroMechanics
)
endif
()
ogs_add_library
(
ProcessLib GENERATE_EXPORT_HEADER
${
SOURCES
}
)
ogs_add_library
(
ProcessLib GENERATE_EXPORT_HEADER
${
SOURCES
}
)
...
...
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