File: ExternalProjectHelper.cmake

package info (click to toggle)
nmodl 0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,992 kB
  • sloc: cpp: 28,492; javascript: 9,841; yacc: 2,804; python: 1,967; lex: 1,674; xml: 181; sh: 136; ansic: 37; makefile: 18; pascal: 7
file content (12 lines) | stat: -rw-r--r-- 473 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
find_package(Git QUIET)

# initialize submodule with given path
function(initialize_submodule path)
  if(NOT ${GIT_FOUND})
    message(
      FATAL_ERROR "git not found and ${path} sub-module not cloned (use git clone --recursive)")
  endif()
  message(STATUS "Sub-module : missing ${path}: running git submodule update --init")
  execute_process(COMMAND git submodule update --init -- ${path}
                  WORKING_DIRECTORY ${NMODL_PROJECT_SOURCE_DIR})
endfunction()