Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirtualFluids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
iRMB
VirtualFluids
Commits
fb2675f6
Commit
fb2675f6
authored
4 years ago
by
Soeren Peters
Browse files
Options
Downloads
Patches
Plain Diff
Added a little bit documentation and formatting.
parent
8cecfc89
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMake/VirtualFluidsMacros.cmake
+40
-5
40 additions, 5 deletions
CMake/VirtualFluidsMacros.cmake
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
src/cpu/VirtualFluidsCore/CMakeLists.txt
+2
-2
2 additions, 2 deletions
src/cpu/VirtualFluidsCore/CMakeLists.txt
with
44 additions
and
9 deletions
CMake/VirtualFluidsMacros.cmake
+
40
−
5
View file @
fb2675f6
#################################################################################
# _ ___ __ __________ _ __
# | | / (_)____/ /___ ______ _/ / ____/ /_ __(_)___/ /____
# | | / / / ___/ __/ / / / __ `/ / /_ / / / / / / __ / ___/
# | |/ / / / / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__ )
# |___/_/_/ \__/\__,_/\__,_/_/_/ /_/\__,_/_/\__,_/____/
#
#################################################################################
#################################################################################
## set global project file endings
#################################################################################
set
(
VIRTUAL_FLUIDS_GLOB_FILES
*.cpp
*.c
...
...
@@ -8,14 +18,31 @@ set (VIRTUAL_FLUIDS_GLOB_FILES
CACHE INTERNAL
"File endings to glob for source files"
)
#################################################################################
## Sets the library name to the current folder name.
## output parameter: library_name
#################################################################################
function
(
vf_get_library_name library_name
)
get_filename_component
(
library_name_out
${
CMAKE_CURRENT_SOURCE_DIR
}
NAME
)
set
(
${
library_name
}
${
library_name_out
}
PARENT_SCOPE
)
endfunction
(
vf_get_library_name
)
#################################################################################
## Add a target, link the libraries and add the compiler flags to the target
## The name of the target is vf_get_library_name().
##
## parameter:
## BUILDTYPE - STATIC; SHARED; EXECUTABLE
## DEPENDS - libraries to link
## FILES - adds these files to the target
## FOLDER - adds all files in these folders to the targets
## EXCLUDE - excludes these files from the target
##
## note: If no files and folders are passed, all files from the level of current
## CMakeLists.txt are added recursively.
##
#################################################################################
function
(
vf_add_library
)
message
(
"Start new Cmake"
)
...
...
@@ -179,6 +206,13 @@ function(vf_add_library)
endfunction
(
vf_add_library
)
#################################################################################
## Add a test executable corresponding to the added target.
## Must be called after vf_add_library().
## The name of the test executable is: vf_get_library_name()Tests
#################################################################################
function
(
vf_add_tests
)
if
(
NOT BUILD_VF_UNIT_TESTS
)
return
()
...
...
@@ -188,11 +222,12 @@ function(vf_add_tests)
set
(
targetName
${
folder_name
}
Tests
)
message
(
Add Test binary:
${
targetName
}
)
file
(
GLOB_RECURSE all_files
${
VIRTUAL_FLUIDS_GLOB_FILES
}
)
set
(
sourceFiles
${
sourceFiles
}
${
all_files
}
)
includeTestFiles
(
${
folder_name
}
"
${
sourceFiles
}
"
)
message
(
${
MY_SRCS
}
)
ADD_EXECUTABLE
(
${
targetName
}
${
MY_SRCS
}
)
add_executable
(
${
targetName
}
${
MY_SRCS
}
)
target_link_libraries
(
${
targetName
}
PRIVATE
${
folder_name
}
)
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
2
−
2
View file @
fb2675f6
...
...
@@ -41,9 +41,9 @@ add_subdirectory(src/basics)
# VIRTUAL FLUIDS CPU / GPU
#################################################################################
#if (BUILD_VF_CPU)
include
(
cpu.cmake
)
#
include (cpu.cmake)
#endif()
#if(BUILD_VF_GPU)
#
include (gpu.cmake)
include
(
gpu.cmake
)
#endif()
This diff is collapsed.
Click to expand it.
src/cpu/VirtualFluidsCore/CMakeLists.txt
+
2
−
2
View file @
fb2675f6
...
...
@@ -93,7 +93,7 @@ message("CAB_ADDITIONAL_LINK_LIBRARIES: " ${CAB_ADDITIONAL_LINK_LIBRARIES})
### CREATE PROJECT ###
#################################################################
#CREATE_CAB_PROJECT(VirtualFluids STATIC)
include
(
${
CMAKE_SOURCE_DIR
}
/CMake/VirtualFluidsMacros.cmake
)
#
include (${CMAKE_SOURCE_DIR}/CMake/VirtualFluidsMacros.cmake)
vf_add_library
(
BUILDTYPE static DEPENDS basics MuParser
${
MPI_LIBRARY
}
)
...
...
@@ -105,6 +105,6 @@ target_include_directories(${library_name} PRIVATE ${CMAKE_SOURCE_DIR}/src/basic
target_include_directories
(
${
library_name
}
PRIVATE
${
CMAKE_SOURCE_DIR
}
/src/basics/basics/container
)
target_include_directories
(
${
library_name
}
PRIVATE
${
CMAKE_SOURCE_DIR
}
/src/basics/basics/memory
)
target_include_directories
(
${
library_name
}
PRIVATE
${
CMAKE_SOURCE_DIR
}
/src/basics/basics/objects
)
target_include_directories
(
${
library_name
}
PRIVATE
${
CMAKE_SOURCE_DIR
}
/src/basics/basics/transmi
i
tter
)
target_include_directories
(
${
library_name
}
PRIVATE
${
CMAKE_SOURCE_DIR
}
/src/basics/basics/transmitter
)
target_include_directories
(
${
library_name
}
PRIVATE
${
CMAKE_SOURCE_DIR
}
/src/basics/basics/utilities
)
target_include_directories
(
${
library_name
}
PRIVATE
${
CMAKE_SOURCE_DIR
}
/src/basics/basics/writer
)
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