cmake_minimum_required(VERSION 3.18) project(raisim_tendon_recipes LANGUAGES CXX) find_package(raisim CONFIG REQUIRED) add_executable(tendon_recipes tendon_recipes.cpp) target_compile_features(tendon_recipes PRIVATE cxx_std_20) target_link_libraries(tendon_recipes PRIVATE raisim::raisim) set(RAISIM_RECIPE_ACTIVATION_KEY "" CACHE FILEPATH "Optional RaiSim activation key for documentation tests") set(_recipe_key "-") if(RAISIM_RECIPE_ACTIVATION_KEY) set(_recipe_key "${RAISIM_RECIPE_ACTIVATION_KEY}") endif() include(CTest) if(BUILD_TESTING) foreach(recipe limit lock spring force servo wrap fixed coupling straight) add_test(NAME tendon_recipe_${recipe} COMMAND tendon_recipes ${recipe} "${_recipe_key}") set_tests_properties(tendon_recipe_${recipe} PROPERTIES TIMEOUT 30) endforeach() add_test(NAME tendon_recipe_export COMMAND tendon_recipes export "${_recipe_key}" "${CMAKE_CURRENT_BINARY_DIR}/tendon_recipe_export.xml") set_tests_properties(tendon_recipe_export PROPERTIES TIMEOUT 30) endif()