CMakeLists-OpenFOAM.txt 835 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#-----------------------------------------------------------------------------
# Standard definitions when using OpenFOAM

if (NOT EXISTS "$ENV{WM_PROJECT_DIR}")
    message(FATAL_ERROR "WM_PROJECT_DIR not set - no OpenFOAM??")
endif()

# WM_OSTYPE env variable is optional (only POSIX anyhow)
if (EXISTS "$ENV{WM_OSTYPE}")
    set(WM_OSTYPE "$ENV{WM_OSTYPE}")
else()
    set(WM_OSTYPE "POSIX")
endif()

15 16 17
# Project libraries, as per wmake internals
set(FOAM_LIBBIN "$ENV{FOAM_LIBBIN}")

18 19 20 21 22 23 24 25 26 27 28 29
# Convenience name, as per wmake internals
set(LIB_SRC "$ENV{WM_PROJECT_DIR}/src")

# Needed for internal label-size, scalar-size, templates
add_definitions(
    -DWM_$ENV{WM_PRECISION_OPTION}
    -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
    -DNoRepository
    -std=c++11
)

#-----------------------------------------------------------------------------