29 lines
835 B
CMake
29 lines
835 B
CMake
if(NOT DEFINED FEMLITE_EXE)
|
|
message(FATAL_ERROR "FEMLITE_EXE is required")
|
|
endif()
|
|
|
|
execute_process(
|
|
COMMAND "${FEMLITE_EXE}" --cclite-capabilities
|
|
RESULT_VARIABLE _rv
|
|
OUTPUT_VARIABLE _stdout
|
|
ERROR_VARIABLE _stderr
|
|
)
|
|
if(NOT _rv EQUAL 0)
|
|
message(FATAL_ERROR "capabilities failed: ${_stdout}\n${_stderr}")
|
|
endif()
|
|
if(_stdout MATCHES "FemLite [0-9]")
|
|
message(FATAL_ERROR "capabilities output must be key=value only")
|
|
endif()
|
|
foreach(_key IN ITEMS
|
|
"solver=FEMLite"
|
|
"cclite_worker=yes"
|
|
"worker_mock=yes"
|
|
"command_block_version=1"
|
|
"data_layout=AOR_V1"
|
|
"supports_fem_to_ccl_facet=yes"
|
|
"supports_ccl_to_fem_load=yes")
|
|
if(NOT _stdout MATCHES "${_key}")
|
|
message(FATAL_ERROR "capabilities output missed ${_key}: ${_stdout}")
|
|
endif()
|
|
endforeach()
|