Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CodeVault
hpc-kernels
unstructured_grids
Commits
bf8c6a0f
Commit
bf8c6a0f
authored
Jan 26, 2016
by
Valeriu Codreanu
Browse files
added CMake build structure for the example in unstructured grids
parent
a0f640ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
0 → 100644
View file @
bf8c6a0f
# ==================================================================================================
# This file is part of the CodeVault project. The project is licensed under Apache Version 2.0.
# CodeVault is part of the EU-project PRACE-4IP (WP7.3.C).
#
# Author(s):
# Evghenii Gaburov <evghenii.gaburov@surfsara.nl>
#
# ==================================================================================================
# CMake project
cmake_minimum_required
(
VERSION 2.8.10 FATAL_ERROR
)
project
(
"8_unstructured"
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../cmake/common.cmake
)
# ==================================================================================================
# Dwarf 8: Unstructured grids
message
(
"--------------------"
)
message
(
"Dwarf 8: Unstructured grids:"
)
message
(
"--------------------"
)
set
(
DWARF_PREFIX 8_unstructured
)
# The prefix of the name of the binaries produced
# Add the examples
add_subdirectory
(
halo_exchange
)
# ==================================================================================================
halo_exchange/CMakeLists.txt
0 → 100644
View file @
bf8c6a0f
# Packages are optional: if they are not present, certain code samples are not compiled
cmake_minimum_required
(
VERSION 2.8.10 FATAL_ERROR
)
find_package
(
MPI
)
# Built-in in CMake
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../../cmake/common.cmake
)
# ==================================================================================================
if
(
"
${
DWARF_PREFIX
}
"
STREQUAL
""
)
set
(
DWARF_PREFIX 8_unstructured
)
endif
()
set
(
NAME
${
DWARF_PREFIX
}
_halo_exchange
)
# C compiler settings
find_package
(
Common
)
if
(
MPI_FOUND
)
cmake_policy
(
SET CMP0003 OLD
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
"
)
include_directories
(
${
MPI_INCLUDE_PATH
}
)
add_executable
(
${
NAME
}
main.c configuration.c mpicomm.c mpitypes.c box.c field.c mesh.c
)
target_link_libraries
(
${
NAME
}
${
MPI_LIBRARIES
}
stdc++
)
install
(
TARGETS
${
NAME
}
DESTINATION bin
)
message
(
"** Enabling '
${
NAME
}
': with MPI"
)
else
()
message
(
"## Skipping '
${
NAME
}
': no MPI support found"
)
# dummy_install(${NAME} "MPI")
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
C_FLAGS
}
"
)
unset
(
NAME
)
# ==================================================================================================
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment