Skip to content

Draft: cmake cleanup

Sebastian Eibl requested to merge cmake_cleanup into master

Refactoring and unifying of how external libraries are imported to waLBerla.

if (NOT DEFINED WALBERLA_BUILD_WITH_XXX)
    find_package(XXX)
    if (XXX_FOUND)
        option(WALBERLA_BUILD_WITH_XXX "Build with XXX" ON)
    else()
        option(WALBERLA_BUILD_WITH_XXX "Build with XXX" OFF)
    endif()
else()
    if (WALBERLA_BUILD_WITH_XXX)
        find_package(XXX REQUIRED)
    endif()
endif()
if (WALBERLA_BUILD_WITH_XXX)
    if (NOT XXX_FOUND)
        message(FATAL_ERROR "something strange happened")
    endif()
    #add external library
    include_directories( XXX )
    link_directories   ( XXX )
    list ( APPEND SERVICE_LIBS XXX )
endif()
Edited by Sebastian Eibl

Merge request reports