The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

39 lines
836 B

# Include dir
find_path(COCOA_INCLUDE_DIR
NAMES CoCoA/library.H
PATHS
/usr/include/
/usr/local/include/
DOC "Include directory for CoCoA"
)
find_library(COCOA_LIBRARY
NAMES cocoa
PATHS
/usr/lib
/usr/local/lib
)
if(COCOA_INCLUDE_DIR AND COCOA_LIBRARY)
set(COCOA_FOUND TRUE)
# Version
function(GetVersion OUTPUT FILENAME)
file(STRINGS ${FILENAME} RES REGEX "CoCoALib version .*")
string(REGEX MATCH "[0-9]+\.[0-9]+" RES "${RES}")
set(${OUTPUT} "${RES}" PARENT_SCOPE)
endfunction()
GetVersion(COCOA_VERSION "${COCOA_INCLUDE_DIR}/CoCoA/library.H")
if(COCOA_FIND_VERSION VERSION_GREATER COCOA_VERSION)
message(WARNING "Required CoCoA ${COCOA_FIND_VERSION} but found only CoCoA ${COCOA_VERSION}.")
return()
endif()
endif()
mark_as_advanced(
COCOA_FOUND
COCOA_INCLUDE_DIR
COCOA_LIBRARY
COCOA_VERSION
)