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
6ce0873d
Commit
6ce0873d
authored
Jan 25, 2021
by
Stephan Schulz
Browse files
Options
Downloads
Patches
Plain Diff
propagate compile definitions outwards, for VTK and Voronoi
parent
6117386c
No related branches found
No related tags found
1 merge request
!15
CMake projectconfig
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+0
-3
0 additions, 3 deletions
CMakeLists.txt
example/CMakeProject/build_all.sh
+1
-0
1 addition, 0 deletions
example/CMakeProject/build_all.sh
misc/preprocess.sh
+1
-1
1 addition, 1 deletion
misc/preprocess.sh
src/CMakeLists.txt
+4
-10
4 additions, 10 deletions
src/CMakeLists.txt
with
6 additions
and
14 deletions
CMakeLists.txt
+
0
−
3
View file @
6ce0873d
...
@@ -75,8 +75,6 @@ if(CM_ALL_VTK_OUTPUT)
...
@@ -75,8 +75,6 @@ if(CM_ALL_VTK_OUTPUT)
if
(
NOT VTK_FOUND
)
if
(
NOT VTK_FOUND
)
message
(
FATAL_ERROR
"VTK not found, help CMake to find it by setting VTK_LIBRARY and VTK_INCLUDE_DIR"
)
message
(
FATAL_ERROR
"VTK not found, help CMake to find it by setting VTK_LIBRARY and VTK_INCLUDE_DIR"
)
endif
()
endif
()
# todo(s.schulz): this can be replaced from 3.12 onwards with add_compile_definitions
add_compile_definitions
(
"ALL_VTK_OUTPUT"
)
endif
(
CM_ALL_VTK_OUTPUT
)
endif
(
CM_ALL_VTK_OUTPUT
)
if
(
CM_ALL_DEBUG
)
if
(
CM_ALL_DEBUG
)
...
@@ -97,7 +95,6 @@ endif(CM_ALL_USE_F08 AND MPI_Fortran_HAVE_F08_MODULE)
...
@@ -97,7 +95,6 @@ endif(CM_ALL_USE_F08 AND MPI_Fortran_HAVE_F08_MODULE)
if
(
CM_ALL_VORONOI
)
if
(
CM_ALL_VORONOI
)
message
(
STATUS
"compiling voro++ version in contrib/voro++"
)
message
(
STATUS
"compiling voro++ version in contrib/voro++"
)
add_subdirectory
(
contrib/voro++
)
add_subdirectory
(
contrib/voro++
)
add_compile_definitions
(
"ALL_VORONOI_ACTIVE"
)
endif
()
endif
()
set
(
STB_INCLUDE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/contrib/stb
)
set
(
STB_INCLUDE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/contrib/stb
)
...
...
This diff is collapsed.
Click to expand it.
example/CMakeProject/build_all.sh
+
1
−
0
View file @
6ce0873d
...
@@ -38,6 +38,7 @@ build_all () {
...
@@ -38,6 +38,7 @@ build_all () {
cmake
--install
"
$ALL_BUILD_DIR
"
cmake
--install
"
$ALL_BUILD_DIR
"
if
[[
$ALL_INSTALL_DIR
!=
$ALL_PACKAGE
]]
if
[[
$ALL_INSTALL_DIR
!=
$ALL_PACKAGE
]]
then
then
rm
-rf
"
$ALL_PACKAGE
"
mv
"
$ALL_INSTALL_DIR
"
"
$ALL_PACKAGE
"
mv
"
$ALL_INSTALL_DIR
"
"
$ALL_PACKAGE
"
fi
fi
}
}
...
...
This diff is collapsed.
Click to expand it.
misc/preprocess.sh
+
1
−
1
View file @
6ce0873d
...
@@ -50,7 +50,7 @@ do
...
@@ -50,7 +50,7 @@ do
DEFINES
=
"
$DEFINES
-D
$d
"
DEFINES
=
"
$DEFINES
-D
$d
"
done
done
gcc
-E
-fdirectives-only
$DEFINES
-o
ALL.ii ALL.hpp
cpp
-undef
-fdirectives-only
$DEFINES
-o
ALL.ii ALL.hpp
mkdir
-p
"
${
OUTFILE
%/*
}
"
mkdir
-p
"
${
OUTFILE
%/*
}
"
cat
ALL.ii |
sed
-e
's!// PPIGNORE <!#include <!'
>
"
$OUTFILE
"
cat
ALL.ii |
sed
-e
's!// PPIGNORE <!#include <!'
>
"
$OUTFILE
"
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
4
−
10
View file @
6ce0873d
...
@@ -17,9 +17,11 @@ add_library (ALL ALL.cpp ALL_fortran.cpp ${ALL_HEADER_FILES})
...
@@ -17,9 +17,11 @@ add_library (ALL ALL.cpp ALL_fortran.cpp ${ALL_HEADER_FILES})
if
(
CM_ALL_VTK_OUTPUT
)
if
(
CM_ALL_VTK_OUTPUT
)
target_include_directories
(
ALL PUBLIC
${
VTK_INCLUDE_DIRS
}
)
target_include_directories
(
ALL PUBLIC
${
VTK_INCLUDE_DIRS
}
)
target_link_libraries
(
ALL PUBLIC
${
VTK_LIBRARIES
}
)
target_link_libraries
(
ALL PUBLIC
${
VTK_LIBRARIES
}
)
target_compile_definitions
(
ALL PUBLIC ALL_VTK_OUTPUT
)
endif
(
CM_ALL_VTK_OUTPUT
)
endif
(
CM_ALL_VTK_OUTPUT
)
if
(
CM_ALL_VORONOI
)
if
(
CM_ALL_VORONOI
)
target_link_libraries
(
ALL PUBLIC voro
)
target_link_libraries
(
ALL PUBLIC voro
)
target_compile_definitions
(
ALL PUBLIC ALL_VORONOI_ACTIVE
)
endif
(
CM_ALL_VORONOI
)
endif
(
CM_ALL_VORONOI
)
target_include_directories
(
ALL PUBLIC
${
MPI_CXX_INCLUDE_PATH
}
)
target_include_directories
(
ALL PUBLIC
${
MPI_CXX_INCLUDE_PATH
}
)
...
@@ -40,16 +42,8 @@ install(TARGETS ALL
...
@@ -40,16 +42,8 @@ install(TARGETS ALL
ARCHIVE DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION include
)
INCLUDES DESTINATION include
)
get_property
(
_glob_comp_def DIRECTORY PROPERTY COMPILE_DEFINITIONS
)
install
(
FILES
${
ALL_HEADER_FILES
}
add_custom_command
(
DESTINATION include
)
TARGET ALL
PRE_BUILD
COMMAND
${
CMAKE_CURRENT_SOURCE_DIR
}
/../misc/preprocess.sh
${
ALL_INCLUDE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
/../include/ALL.hpp
${
_glob_comp_def
}
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/../include/ALL.hpp DESTINATION include
)
#install(FILES ${ALL_HEADER_FILES}
# DESTINATION include)
if
(
CM_ALL_FORTRAN
)
if
(
CM_ALL_FORTRAN
)
set
(
CMAKE_Fortran_MODULE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/../modules
)
set
(
CMAKE_Fortran_MODULE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/../modules
)
...
...
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