Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loadbalancing
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
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SLMS
loadbalancing
Commits
f7fc0cf5
Commit
f7fc0cf5
authored
Jan 26, 2021
by
Stephan Schulz
Browse files
Options
Downloads
Patches
Plain Diff
somewhat autoconfig for makefiles
parent
45066c2d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+19
-1
19 additions, 1 deletion
CMakeLists.txt
example/MakefileProject/Makefile
+8
-6
8 additions, 6 deletions
example/MakefileProject/Makefile
with
27 additions
and
7 deletions
CMakeLists.txt
+
19
−
1
View file @
f7fc0cf5
...
@@ -133,7 +133,6 @@ endif(CM_ALL_AUTO_DOC)
...
@@ -133,7 +133,6 @@ endif(CM_ALL_AUTO_DOC)
# Export targets and create package
# Export targets and create package
install
(
EXPORT ALLTargets
install
(
EXPORT ALLTargets
NAMESPACE ALL::
NAMESPACE ALL::
FILE ALLTargets.cmake
FILE ALLTargets.cmake
...
@@ -154,5 +153,24 @@ install(FILES
...
@@ -154,5 +153,24 @@ install(FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/ALLConfigVersion.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/ALLConfigVersion.cmake"
DESTINATION lib/cmake/ALL
)
DESTINATION lib/cmake/ALL
)
# Create Makefile.libALL.in for inclusion in external Makefile projects
# todo(s.schulz): The include directories and libraries should be auto
# detected... but that is not easily done right now. Ideally, this should also
# provide the very long VTK linker flags.
set
(
ALL_MAKEFILE_INC
${
CMAKE_CURRENT_BINARY_DIR
}
/Makefile.libALL.in
)
get_target_property
(
_liball_defines ALL INTERFACE_COMPILE_DEFINITIONS
)
list
(
TRANSFORM _liball_defines PREPEND
" -D"
)
list
(
JOIN _liball_defines
" "
_liball_defines_string
)
file
(
WRITE
${
ALL_MAKEFILE_INC
}
"LIBALL_DEFINES :=
${
_liball_defines_string
}
\n
"
)
file
(
APPEND
${
ALL_MAKEFILE_INC
}
"LIBALL_INCLUDE := -I
\$
(ALL_DIR)/include
\n
"
)
file
(
APPEND
${
ALL_MAKEFILE_INC
}
"LIBALL_LIB :=
\n
"
)
if
(
CM_ALL_FORTRAN
)
file
(
APPEND
${
ALL_MAKEFILE_INC
}
"LIBALL_LIB +=
\$
(ALL_DIR)/lib/libALL_fortran.a
\$
(ALL_DIR)/lib/libALL.a -lstdc++
\n
"
)
file
(
APPEND
${
ALL_MAKEFILE_INC
}
"LIBALL_INCLUDE += -I
\$
(ALL_DIR)/include/modules
\n
"
)
endif
()
if
(
CM_ALL_VORONOI
)
file
(
APPEND
${
ALL_MAKEFILE_INC
}
"LIBALL_LIB +=
\$
(ALL_DIR)/lib/libvoro.a
\n
"
)
endif
()
install
(
FILES
${
ALL_MAKEFILE_INC
}
DESTINATION lib/make
)
# vim: sw=4 ts=4 et
# vim: sw=4 ts=4 et
This diff is collapsed.
Click to expand it.
example/MakefileProject/Makefile
+
8
−
6
View file @
f7fc0cf5
...
@@ -19,18 +19,20 @@ MFC=mpifort
...
@@ -19,18 +19,20 @@ MFC=mpifort
ALL_DIR
=
all_bin
ALL_DIR
=
all_bin
VTK_DIR
=
vtk_bin
VTK_DIR
=
vtk_bin
# Source tree and temporary build directory
ALL_BUILD
=
all_build
ALL_BUILD
=
all_build
ALL_SOURCE
=
all
ALL_SOURCE
=
all
ALL_SOURCE
=
../..
ALL_SOURCE
=
../..
LIBALL_INCLUDE
:=
-I
$(
ALL_DIR
)
/include/modules
-I
$(
ALL_DIR
)
/include
# Which features should be enabled for ALL
LIBALL_LIB
:=
$(
ALL_DIR
)
/lib/libALL_fortran.a
$(
ALL_DIR
)
/lib/libALL.a
LIBALL_LIB
+=
$(
ALL_DIR
)
/lib/libvoro.a
LIBALL_CONFIG_FILE
:=
$(
ALL_DIR
)
/lib/cmake/ALL/ALLConfig.cmake
LIBALL_DEFINES
+=
-DALL_VTK_OUTPUT
-DALL_VORONOI_ACTIVE
LIBALL_CONFIGURE
:=
-DCM_ALL_FORTRAN
=
ON
-DCM_ALL_VORONOI
=
ON
-DCM_ALL_VTK_OUTPUT
=
ON
-DCMAKE_BUILD_TYPE
=
Release
LIBALL_CONFIGURE
:=
-DCM_ALL_FORTRAN
=
ON
-DCM_ALL_VORONOI
=
ON
-DCM_ALL_VTK_OUTPUT
=
ON
-DCMAKE_BUILD_TYPE
=
Release
LIBALL_CONFIG_FILE
:=
$(
ALL_DIR
)
/lib/make/Makefile.libALL.in
# This will provide the variables LIBALL_DEFINES, LIBALL_INCLUDE and
# LIBALL_LIB, which need to be passed to the compiler and linker.
-include
$(LIBALL_CONFIG_FILE)
# Since gfortran does not link the standard C++ library by default, we need to
# Since gfortran does not link the standard C++ library by default, we need to
# explicitly state it.
# explicitly state it.
FFLAGS
+=
-lstdc
++
FFLAGS
+=
-lstdc
++
...
...
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
sign in
to comment