-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathESMP_install_step.cmake.in
More file actions
35 lines (25 loc) · 999 Bytes
/
ESMP_install_step.cmake.in
File metadata and controls
35 lines (25 loc) · 999 Bytes
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
include(@cdat_CMAKE_BINARY_DIR@/cdat_common_environment.cmake)
file(GLOB_RECURSE ESMP_esmfmkfile "@cdat_EXTERNALS@/lib/libO/*.mk")
file(RELATIVE_PATH _rel_path @PYTHON_SITE_PACKGES_PREFIX@/ESMP/src ${ESMP_esmfmkfile})
set(ENV{ESMFMKFILE} ${_rel_path})
foreach( item ${ESMP_esmfmkfile})
message("item " ${item})
endforeach( item ${ESMP_esmfmkfile})
execute_process(
COMMAND "@PYTHON_EXECUTABLE@" generateESMP_Config.py
WORKING_DIRECTORY @ESMP_source@
OUTPUT_VARIABLE CDAT_OUT
ERROR_VARIABLE CDAT_ERR
RESULT_VARIABLE res)
if(NOT ${res} EQUAL 0)
message("Install Errors detected: \n${CDAT_OUT}\n${CDAT_ERR}")
message(FATAL_ERROR "Error in Install")
endif()
if(NOT EXISTS @ESMP_source@/src/ESMP_Config.py)
message(FATAL_ERROR "ESMP_Config.py not created")
endif()
file(INSTALL @ESMP_source@ DESTINATION @PYTHON_SITE_PACKAGES@)
if(NOT EXISTS @PYTHON_SITE_PACKAGES@/ESMP/src/ESMP_Config.py)
message(FATAL_ERROR "Install process failed")
endif()
message("Install succeeded.")