Add submodule init and update to cmake
This commit is contained in:
parent
7357fe161b
commit
3e2247f5a0
|
@ -153,6 +153,15 @@ else()
|
||||||
message(STATUS "Building without build tag")
|
message(STATUS "Building without build tag")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Update and init submodules by default
|
||||||
|
if(NOT MANUAL_SUBMODULES)
|
||||||
|
find_package(Git)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
message(STATUS "Initializing submodules")
|
||||||
|
execute_process(COMMAND git "submodule" "update" "--init" "--recursive" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")
|
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")
|
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")
|
||||||
|
|
||||||
|
|
|
@ -135,13 +135,10 @@ build the library binary manually. This can be done with the following command `
|
||||||
|
|
||||||
### Cloning the repository
|
### Cloning the repository
|
||||||
|
|
||||||
Clone recursively to pull-in needed submodule(s):
|
`$ git clone https://github.com/wownero/wownero`
|
||||||
|
|
||||||
`$ git clone --recursive https://github.com/wownero/wownero`
|
Submodules are fetched and updated automatically. If you wish to
|
||||||
|
do this manually, run CMake flag `-DMANUAL_SUBMODULES=ON` to opt out.
|
||||||
If you already have a repo cloned, initialize and update:
|
|
||||||
|
|
||||||
`$ cd wownero && git submodule init && git submodule update`
|
|
||||||
|
|
||||||
### Build instructions
|
### Build instructions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue