Skip to content
Snippets Groups Projects
Commit 72ad48fd authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

enable option to fail if cmake dependencies are not met

parent ac3454f4
No related tags found
No related merge requests found
......@@ -99,6 +99,7 @@ option ( WALBERLA_PROFILE_USE "Uses Profile to optimize"
option ( WALBERLA_OPTIMIZE_FOR_LOCALHOST "Enable compiler optimizations spcific to localhost" )
option ( WALBERLA_LOG_SKIPPED "Log skipped cmake targets" ON )
option ( WALBERLA_DEPS_ERROR "Fail if module dependencies are not met" OFF )
option ( WALBERLA_GIT_SUBMODULE_AUTO "Check submodules during cmake run" ON )
......
......@@ -174,6 +174,9 @@ function ( waLBerla_add_executable )
foreach ( depMod ${ARG_DEPENDS} )
get_module_library_name ( depModLibraryName ${depMod} )
if( NOT TARGET ${depModLibraryName} )
if( WALBERLA_DEPS_ERROR )
message( FATAL_ERROR "Module ${depMod} is missing to build target ${ARG_NAME}" )
endif()
if( WALBERLA_LOG_SKIPPED )
message ( STATUS "Skipping ${ARG_NAME} since dependent module ${depMod} was not built" )
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment