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
7421f38b
Commit
7421f38b
authored
4 years ago
by
Soeren Peters
Browse files
Options
Downloads
Patches
Plain Diff
Use LTO only while building libraries.
parent
9ff1fe52
No related branches found
No related tags found
1 merge request
!34
Add new library, which contains the calculation of the macroscopic quantities and a general cumulant computation. (Closes #13)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMake/VirtualFluidsMacros.cmake
+18
-16
18 additions, 16 deletions
CMake/VirtualFluidsMacros.cmake
with
18 additions
and
16 deletions
CMake/VirtualFluidsMacros.cmake
+
18
−
16
View file @
7421f38b
...
...
@@ -131,18 +131,18 @@ function(vf_add_library)
#################################################################
### ADD TARGET ###
#################################################################
IF
(
${
ARG_BUILDTYPE
}
MATCHES binary
)
ADD_EXECUTABLE
(
${
library_name
}
${
MY_SRCS
}
)
if
(
${
ARG_BUILDTYPE
}
MATCHES binary
)
add_executable
(
${
library_name
}
${
MY_SRCS
}
)
groupTarget
(
${
library_name
}
${
appFolder
}
)
ELSEIF
(
${
ARG_BUILDTYPE
}
MATCHES shared
)
ADD_LIBRARY
(
${
library_name
}
SHARED
${
MY_SRCS
}
)
elseif
(
${
ARG_BUILDTYPE
}
MATCHES shared
)
add_library
(
${
library_name
}
SHARED
${
MY_SRCS
}
)
groupTarget
(
${
library_name
}
${
libraryFolder
}
)
ELSEIF
(
${
ARG_BUILDTYPE
}
MATCHES static
)
ADD_LIBRARY
(
${
library_name
}
STATIC
${
MY_SRCS
}
)
elseif
(
${
ARG_BUILDTYPE
}
MATCHES static
)
add_library
(
${
library_name
}
STATIC
${
MY_SRCS
}
)
groupTarget
(
${
library_name
}
${
libraryFolder
}
)
ELSE
()
MESSAGE
(
FATAL_ERROR
"build_type=
${
ARG_BUILDTYPE
}
doesn't match BINARY, SHARED or STATIC"
)
ENDIF
()
else
()
message
(
FATAL_ERROR
"build_type=
${
ARG_BUILDTYPE
}
doesn't match BINARY, SHARED or STATIC"
)
endif
()
# Set the output directory for build artifacts
set_target_properties
(
${
library_name
}
...
...
@@ -153,14 +153,16 @@ function(vf_add_library)
PDB_OUTPUT_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
/bin"
)
# link time optimization
include
(
CheckIPOSupported
)
check_ipo_supported
(
RESULT ipo_supported OUTPUT ipo_error
)
if
(
NOT
${
ARG_BUILDTYPE
}
MATCHES binary
)
include
(
CheckIPOSupported
)
check_ipo_supported
(
RESULT ipo_supported OUTPUT ipo_error
)
if
(
ipo_supported
)
status_lib
(
"IPO / LTO enabled"
)
set_target_properties
(
${
library_name
}
PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE
)
else
()
status_lib
(
"IPO / LTO not supported: <
${
ipo_error
}
>"
)
if
(
ipo_supported
)
status_lib
(
"IPO / LTO enabled"
)
set_target_properties
(
${
library_name
}
PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE
)
else
()
status_lib
(
"IPO / LTO not supported: <
${
ipo_error
}
>"
)
endif
()
endif
()
# clang-tidy
...
...
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