mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
cb8bef9423
CMake is using stamp files to check if the external projects are out of date. There is an option 'BUILD_ALWAYS 1' of ExternalProject_Add, but it is not available prior to CMake 3.1. To work around it, this commit solves two problems at once: - Add a new step 'check_submodules' between configure and build to check if all submodules are up to date. This step has the option 'ALWAYS 1', which means it is always considered outdated. - Since 'build' depends on the above step, it will always be started
14 lines
622 B
CMake
14 lines
622 B
CMake
execute_process(COMMAND git submodule status --recursive WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../" OUTPUT_VARIABLE git_status_output)
|
|
string(REPLACE "\n" ";" git_status_output "${git_status_output}")
|
|
foreach( a ${git_status_output})
|
|
if(NOT ${a} MATCHES " [a-f,0-9]* external_dependencies[.]*")
|
|
message(WARNING
|
|
"*****************************************************************
|
|
WARNING: The git submodules are out of sync! Please run
|
|
git submodule update --init --recursive
|
|
in your source directory
|
|
*****************************************************************")
|
|
endif()
|
|
endforeach()
|
|
|