-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (33 loc) · 944 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.5.0)
project(mpi-stubs VERSION 4.2 LANGUAGES C)
option(BUILD_SHARED_LIBS "Build libraries as SHARED" TRUE)
add_library(mpi_abi mpistubs.c)
set_target_properties(mpi_abi PROPERTIES VERSION 0)
include(GNUInstallDirs)
install(FILES mpi.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS mpi_abi DESTINATION ${CMAKE_INSTALL_LIBDIR})
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
set(permissions
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
set(CC CC)
set(cc cc)
set(op cc)
configure_file(mpicc.in mpicc @ONLY)
install(
FILES ${CMAKE_BINARY_DIR}/mpicc
PERMISSIONS ${permissions}
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
set(CC CXX)
set(cc c++)
set(op cxx)
configure_file(mpicc.in mpicxx @ONLY)
install(
FILES ${CMAKE_BINARY_DIR}/mpicxx
PERMISSIONS ${permissions}
DESTINATION ${CMAKE_INSTALL_BINDIR}
)