-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
52 lines (39 loc) · 1.56 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# (C) Copyright 2017 UCAR
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# CRTM bundle
#
#----------------------------------------------------
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
project(crtm-bundle VERSION 1.0.0 LANGUAGES Fortran)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
find_package(ecbuild)
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/ecbuild/cmake;${CMAKE_MODULE_PATH}")
include( ecbuild_bundle )
#-----------------------------------------------------
ecbuild_bundle_initialize()
message("cloning the CRTM repository")
ecbuild_bundle( PROJECT crtm GIT "https://github.com/jcsda/crtm.git" BRANCH master UPDATE )
#message("cloning the CRTM documentation")
#execute_process(
# COMMAND "${GIT_EXECUTABLE}" clone https://github.com/JCSDA-internal/crtm-documentation.git
# RESULT_VARIABLE nok ERROR_VARIABLE error
# WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
#message("${error}")
message("cloning the pycrtm project")
execute_process(
COMMAND "${GIT_EXECUTABLE}" clone --branch=feature/btj_crtm-bundle https://github.com/jcsda/pycrtm.git
RESULT_VARIABLE nok ERROR_VARIABLE error
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
message("${error}")
# Build Doxygen documentation
option(BUILD_CRTM_BUNDLE_DOC "Build documentation" OFF) #to-do with CRTM documentation
if(BUILD_CRTM_BUNDLE_DOC)
add_subdirectory( Documentation )
endif(BUILD_CRTM_BUNDLE_DOC)
ecbuild_bundle_finalize()
include(CTest)