38 lines
1.1 KiB
CMake
38 lines
1.1 KiB
CMake
if(NOT DEFINED FEMLITE_EXE)
|
|
message(FATAL_ERROR "FEMLITE_EXE is required")
|
|
endif()
|
|
if(NOT DEFINED INPUT_FILE)
|
|
message(FATAL_ERROR "INPUT_FILE is required")
|
|
endif()
|
|
if(NOT DEFINED WORKING_DIRECTORY)
|
|
message(FATAL_ERROR "WORKING_DIRECTORY is required")
|
|
endif()
|
|
if(NOT DEFINED OUT_DIR)
|
|
message(FATAL_ERROR "OUT_DIR is required")
|
|
endif()
|
|
|
|
execute_process(
|
|
COMMAND "${FEMLITE_EXE}" "${INPUT_FILE}" --output-dir "${OUT_DIR}"
|
|
WORKING_DIRECTORY "${WORKING_DIRECTORY}"
|
|
RESULT_VARIABLE run_result
|
|
OUTPUT_VARIABLE run_output
|
|
ERROR_VARIABLE run_error
|
|
)
|
|
|
|
if(NOT run_result EQUAL 0)
|
|
message(STATUS "${run_output}")
|
|
message(STATUS "${run_error}")
|
|
message(FATAL_ERROR "generic buckling run failed")
|
|
endif()
|
|
|
|
if(NOT run_output MATCHES "Generic buckling solve completed")
|
|
message(STATUS "${run_output}")
|
|
message(FATAL_ERROR "generic buckling completion message was not printed")
|
|
endif()
|
|
|
|
foreach(output_name buckling_summary.csv buckling_modes.csv)
|
|
if(NOT EXISTS "${OUT_DIR}/${output_name}")
|
|
message(FATAL_ERROR "missing generic buckling output: ${OUT_DIR}/${output_name}")
|
|
endif()
|
|
endforeach()
|