diff --git a/Sofa/framework/Config/cmake/SofaMacrosConfigure.cmake b/Sofa/framework/Config/cmake/SofaMacrosConfigure.cmake index 72d70597eb5..2038c25a30d 100644 --- a/Sofa/framework/Config/cmake/SofaMacrosConfigure.cmake +++ b/Sofa/framework/Config/cmake/SofaMacrosConfigure.cmake @@ -97,7 +97,8 @@ macro(sofa_add_generic directory name type) set(multiValueArgs) cmake_parse_arguments("ARG" "${optionArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${directory}" AND IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${directory}") + if( EXISTS "${CMAKE_CURRENT_LIST_DIR}/${directory}" AND IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${directory}" + OR EXISTS "${directory}" AND IS_DIRECTORY "${directory}") string(TOUPPER ${type}_${name} option) string(REPLACE "." "_" option ${option}) string(TOLOWER ${type} type_lower) @@ -168,10 +169,20 @@ macro(sofa_add_generic directory name type) endif() endif() else() - message("The ${type_lower} ${name} (${CMAKE_CURRENT_LIST_DIR}/${directory}) does not exist and will be ignored.") + message("ERROR while adding ${type_lower} ${name}: neither ${CMAKE_CURRENT_LIST_DIR}/${directory} nor ${directory} exist. It will thus be ignored.") endif() endmacro() +### Macro to help external projects management +# It produces the correct naming for cmake flag generation and the actual name of the project +macro(get_name_from_source_dir) + get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME) + string(REPLACE "\." "_" fixed_name ${ProjectId}) + string(TOUPPER ${fixed_name} fixed_name) + + set(inner-project-name ${ProjectId}) + set(inner-project-name-upper ${fixed_name}) +endmacro() ### External projects management # Thanks to http://crascit.com/2015/07/25/cmake-gtest/ @@ -185,21 +196,12 @@ endmacro() # FETCH_ONLY = do not "add_subdirectory" the fetched repository # See plugins/SofaHighOrder for example # -function(sofa_add_generic_external directory name type) +function(sofa_add_generic_external name type) set(optionArgs FETCH_ONLY) - set(oneValueArgs DEFAULT_VALUE WHEN_TO_SHOW VALUE_IF_HIDDEN GIT_REF) + set(oneValueArgs DEFAULT_VALUE WHEN_TO_SHOW VALUE_IF_HIDDEN GIT_REF GIT_REPOSITORY) set(multiValueArgs) cmake_parse_arguments("ARG" "${optionArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - # Make directory absolute - if(NOT IS_ABSOLUTE "${directory}") - set(directory "${CMAKE_CURRENT_LIST_DIR}/${directory}") - endif() - if(NOT EXISTS "${directory}") - message("${directory} does not exist and will be ignored.") - return() - endif() - string(TOLOWER ${type} type_lower) # Default value for fetch activation and for plugin activation (if adding a plugin) @@ -208,9 +210,12 @@ function(sofa_add_generic_external directory name type) set(active ON) endif() + set(directory "${CMAKE_CURRENT_LIST_DIR}/${name}") + # Create option string(REPLACE "\." "_" fixed_name ${name}) string(TOUPPER ${PROJECT_NAME}_FETCH_${fixed_name} fetch_enabled) + string(TOUPPER ${fixed_name} upper_name) if(NOT "${ARG_WHEN_TO_SHOW}" STREQUAL "" AND NOT "${ARG_VALUE_IF_HIDDEN}" STREQUAL "") cmake_dependent_option(${fetch_enabled} "Fetch/update ${name} repository." ${active} "${ARG_WHEN_TO_SHOW}" ${ARG_VALUE_IF_HIDDEN}) else() @@ -219,71 +224,69 @@ function(sofa_add_generic_external directory name type) # Setup fetch directory set(fetched_dir "${CMAKE_BINARY_DIR}/external_directories/fetched/${name}" ) + file(RELATIVE_PATH relative_path "${CMAKE_SOURCE_DIR}" "${directory}") # Fetch if(${fetch_enabled}) - message("Fetching ${type_lower} ${name}") + set(${upper_name}_GIT_REPOSITORY "${ARG_GIT_REPOSITORY}" CACHE STRING "Repository address" ) + set(${upper_name}_GIT_TAG "${ARG_GIT_REF}" CACHE STRING "Branch or commit SHA to checkout" ) - if("${ARG_GIT_REF}" STREQUAL "") - message(SEND_ERROR "One value argument GIT_REF is required when option EXTERNAL is set. This is the name of the branch or the tag checkouted when cloning the subdirectory.") - return() - endif() + message("Fetching ${type_lower} ${name} in ${fetched_dir}") + message(STATUS "Checkout reference ${${upper_name}_GIT_TAG} from repository ${${upper_name}_GIT_REPOSITORY} ") - if(NOT EXISTS ${fetched_dir}) - file(MAKE_DIRECTORY "${fetched_dir}/") + #Generate temporary folder to store project that will fetch the sources + if(NOT EXISTS ${fetched_dir}-temp) + file(MAKE_DIRECTORY "${fetched_dir}-temp/") endif() - # Download and unpack at configure time - configure_file(${directory}/ExternalProjectConfig.cmake.in ${fetched_dir}/CMakeLists.txt) - # Copy ExternalProjectConfig.cmake.in in build dir for post-pull recovery in src dir - file(COPY ${directory}/ExternalProjectConfig.cmake.in DESTINATION ${fetched_dir}) - - # Execute commands to fetch content - message(" Pulling reference ${ARG_GIT_REF}...") + file(WRITE ${fetched_dir}-temp/CMakeLists.txt " + cmake_minimum_required(VERSION 3.22) + include(ExternalProject) + ExternalProject_Add( + ${name} + GIT_REPOSITORY ${${upper_name}_GIT_REPOSITORY} + GIT_TAG ${${upper_name}_GIT_TAG} + SOURCE_DIR ${fetched_dir} + BINARY_DIR \"\" + CONFIGURE_COMMAND \"\" + BUILD_COMMAND \"\" + INSTALL_COMMAND \"\" + TEST_COMMAND \"\" + GIT_CONFIG \"remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*\" + )" + ) - file(WRITE "${fetched_dir}/logs.txt" "") # Empty log file execute_process(COMMAND "${CMAKE_COMMAND}" -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} -G "${CMAKE_GENERATOR}" . - WORKING_DIRECTORY "${fetched_dir}" - RESULT_VARIABLE generate_exitcode - OUTPUT_VARIABLE generate_logs ERROR_VARIABLE generate_logs) - file(APPEND "${fetched_dir}/logs.txt" "${generate_logs}") + WORKING_DIRECTORY "${fetched_dir}-temp" + RESULT_VARIABLE generate_exitcode + OUTPUT_VARIABLE generate_logs ERROR_VARIABLE generate_logs) + file(APPEND "${fetched_dir}-temp/logs.txt" "${generate_logs}") execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${fetched_dir}" - RESULT_VARIABLE build_exitcode - OUTPUT_VARIABLE build_logs ERROR_VARIABLE build_logs) - file(APPEND "${fetched_dir}/logs.txt" "${build_logs}") - - if(generate_exitcode EQUAL 0 AND build_exitcode EQUAL 0 AND EXISTS "${directory}/.git") - message(" Success.") - # Add .gitignore for Sofa - file(WRITE "${directory}/.gitignore" "*") - # Recover ExternalProjectConfig.cmake.in from build dir (erased by pull) - file(COPY ${fetched_dir}/ExternalProjectConfig.cmake.in DESTINATION ${directory}) - # Disable fetching for next configure - set(${fetch_enabled} OFF CACHE BOOL "Fetch/update ${name} repository." FORCE) - message(" ${fetch_enabled} is now OFF. Set it back to ON to trigger a new fetch.") - else() - message(SEND_ERROR "Failed to add external repository ${name}." - "\nSee logs in ${fetched_dir}/logs.txt") + WORKING_DIRECTORY "${fetched_dir}-temp" + RESULT_VARIABLE build_exitcode + OUTPUT_VARIABLE build_logs ERROR_VARIABLE build_logs) + file(APPEND "${fetched_dir}-temp/logs.txt" "${build_logs}") + + if(NOT generate_exitcode EQUAL 0 OR NOT build_exitcode EQUAL 0) + message(SEND_ERROR "Failed to fetch external repository ${name}." "\nSee logs in ${fetched_dir}/logs.txt") endif() + endif() # Add - if(EXISTS "${directory}/.git" AND IS_DIRECTORY "${directory}/.git") - configure_file(${directory}/ExternalProjectConfig.cmake.in ${fetched_dir}/CMakeLists.txt) + if(EXISTS "${fetched_dir}/.git" AND IS_DIRECTORY "${fetched_dir}/.git") if(NOT ARG_FETCH_ONLY AND "${type}" MATCHES ".*directory.*") - add_subdirectory("${directory}") + add_subdirectory("${fetched_dir}" "${CMAKE_BINARY_DIR}/${relative_path}") elseif(NOT ARG_FETCH_ONLY AND "${type}" MATCHES ".*plugin.*") - sofa_add_subdirectory(plugin "${name}" "${name}" ${active}) + sofa_add_generic("${fetched_dir}" "${name}" plugin DEFAULT_VALUE ${active} BINARY_DIR "${CMAKE_BINARY_DIR}/${relative_path}") endif() endif() endfunction() macro(sofa_add_subdirectory type directory name) - set(optionArgs EXTERNAL EXPERIMENTAL) - set(oneValueArgs GIT_REF) + set(optionArgs EXPERIMENTAL) set(multiValueArgs) cmake_parse_arguments("ARG" "${optionArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -295,22 +298,12 @@ macro(sofa_add_subdirectory type directory name) endif() set(default_value OFF) - if(ARG_EXTERNAL) - set(input_value ${ARGV6}) - else() - set(input_value ${ARGV3}) - endif () - + set(input_value ${ARGV3}) if(${input_value}) set(default_value ON) endif() - - if(ARG_EXTERNAL) - sofa_add_generic_external(${directory} ${name} "External ${type_lower}" GIT_REF ${ARG_GIT_REF} DEFAULT_VALUE ${default_value} ${ARGN}) - else() - sofa_add_generic(${directory} ${name} ${type_lower} DEFAULT_VALUE ${default_value} ${ARGN}) - endif() + sofa_add_generic(${directory} ${name} ${type_lower} DEFAULT_VALUE ${default_value} ${ARGN}) if(ARG_EXPERIMENTAL) if(TARGET ${name}) @@ -319,7 +312,28 @@ macro(sofa_add_subdirectory type directory name) endif() endmacro() +macro(sofa_add_external type name) + set(optionArgs EXPERIMENTAL) + set(oneValueArgs GIT_REF GIT_REPOSITORY) + set(multiValueArgs) + cmake_parse_arguments("ARG" "${optionArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + set(valid_types "application" "project" "plugin" "module" "library" "collection" "directory") + + string(TOLOWER "${type}" type_lower) + if(NOT "${type}" IN_LIST valid_types) + message(SEND_ERROR "Type \"${type}\" is invalid. Valid types are: ${valid_types}.") + endif() + + set(default_value OFF) + set(input_value ${ARGV6}) + if(${input_value}) + set(default_value ON) + endif() + sofa_add_generic_external(${directory} ${name} "External ${type_lower}" GIT_REF ${ARG_GIT_REF} GIT_REPOSITORY ${ARG_GIT_REPOSITORY} DEFAULT_VALUE ${default_value} ${ARGN}) + +endmacro() macro(sofa_add_subdirectory_modules output_targets) set(optionArgs) @@ -331,7 +345,7 @@ macro(sofa_add_subdirectory_modules output_targets) set(missing_targets) foreach(dir ${ARG_DIRECTORIES}) set(subdir_name "${PROJECT_NAME}.${dir}") - sofa_add_subdirectory(module ${dir} ${subdir_name} ON) + sofa_add_generic(${dir} ${subdir_name} module DEFAULT_VALUE ON) if(TARGET ${subdir_name}) list(APPEND ${output_targets} ${subdir_name}) else() @@ -455,47 +469,3 @@ macro(sofa_set_targets_release_only) endmacro() - -####################################################### -################## DEPRECATED MACROS ################## -####################################################### - -macro(sofa_add_collection directory name) - message(WARNING "Deprecated macro 'sofa_add_collection'.\n Use 'sofa_add_subdirectory(collection ${directory} ${name})' instead.") - sofa_add_subdirectory(collection ${ARGV}) -endmacro() - -macro(sofa_add_plugin directory plugin_name) - message(WARNING "Deprecated macro 'sofa_add_plugin'.\n Use 'sofa_add_subdirectory(plugin ${directory} ${plugin_name})' instead.") - sofa_add_subdirectory(plugin ${ARGV}) -endmacro() - -macro(sofa_add_plugin_experimental directory plugin_name) - message(WARNING "Deprecated macro 'sofa_add_plugin_experimental'.\n Use 'sofa_add_subdirectory(plugin ${directory} ${plugin_name} EXPERIMENTAL)' instead.") - sofa_add_subdirectory(plugin ${ARGV} EXPERIMENTAL) -endmacro() - -macro(sofa_add_module directory module_name) - message(WARNING "Deprecated macro 'sofa_add_module'.\n Use 'sofa_add_subdirectory(module ${directory} ${module_name})' instead.") - sofa_add_subdirectory(module ${ARGV}) -endmacro() - -macro(sofa_add_module_experimental directory module_name) - message(WARNING "Deprecated macro 'sofa_add_module_experimental'.\n Use 'sofa_add_subdirectory(module ${directory} ${module_name} EXPERIMENTAL)' instead.") - sofa_add_subdirectory(module ${ARGV} EXPERIMENTAL) -endmacro() - -macro(sofa_add_application directory app_name) - message(WARNING "Deprecated macro 'sofa_add_application'.\n Use 'sofa_add_subdirectory(application ${directory} ${app_name})' instead.") - sofa_add_subdirectory(application ${ARGV}) -endmacro() - -function(sofa_add_subdirectory_external directory name) - message(WARNING "Deprecated macro 'sofa_add_subdirectory_external'.\n Use 'sofa_add_subdirectory(directory ${directory} ${name} EXTERNAL)' instead.") - sofa_add_subdirectory(directory ${ARGV} EXTERNAL) -endfunction() - -function(sofa_add_plugin_external directory name) - message(WARNING "Deprecated macro 'sofa_add_plugin_external'.\n Use 'sofa_add_subdirectory(plugin ${directory} ${name} EXTERNAL)' instead.") - sofa_add_subdirectory(plugin ${ARGV} EXTERNAL) -endfunction() diff --git a/applications/plugins/BeamAdapter/ExternalProjectConfig.cmake.in b/applications/plugins/BeamAdapter/ExternalProjectConfig.cmake.in deleted file mode 100644 index 82bfdff8a90..00000000000 --- a/applications/plugins/BeamAdapter/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(BeamAdapter - GIT_REPOSITORY https://github.com/sofa-framework/BeamAdapter - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/BeamAdapter" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/CGALPlugin/ExternalProjectConfig.cmake.in b/applications/plugins/CGALPlugin/ExternalProjectConfig.cmake.in deleted file mode 100644 index 24a5634cf36..00000000000 --- a/applications/plugins/CGALPlugin/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(CGALPlugin - GIT_REPOSITORY https://github.com/sofa-framework/CGALPlugin - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/CGALPlugin" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/CMakeLists.txt b/applications/plugins/CMakeLists.txt index b2e399dba41..a58836c2820 100644 --- a/applications/plugins/CMakeLists.txt +++ b/applications/plugins/CMakeLists.txt @@ -10,24 +10,24 @@ endif() sofa_add_subdirectory(plugin CollisionOBBCapsule CollisionOBBCapsule) sofa_add_subdirectory(plugin HeadlessRecorder HeadlessRecorder) -sofa_add_subdirectory(directory SofaHighOrder SofaHighOrder EXTERNAL GIT_REF master) +sofa_add_external(directory SofaHighOrder GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/SofaHighOrder.git) sofa_add_subdirectory(plugin CImgPlugin CImgPlugin) # Define first as it is used by other plugins. sofa_add_subdirectory(plugin ArticulatedSystemPlugin ArticulatedSystemPlugin) sofa_add_subdirectory(plugin SofaEulerianFluid SofaEulerianFluid) -sofa_add_subdirectory(plugin SofaSphFluid SofaSphFluid EXTERNAL GIT_REF master) +sofa_add_external(plugin SofaSphFluid GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/SofaSphFluid.git) sofa_add_subdirectory(plugin MultiThreading MultiThreading ON) sofa_add_subdirectory(plugin DiffusionSolver DiffusionSolver) # Depends on CImgPlugin sofa_add_subdirectory(plugin image image) # Depends on CImgPlugin, DiffusionSolver, MultiThreading (soft) sofa_add_subdirectory(plugin SofaNewmat SofaNewmat) -sofa_add_subdirectory(directory SofaPython3 SofaPython3 EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin CGALPlugin CGALPlugin EXTERNAL GIT_REF master) # Depends on image -sofa_add_subdirectory(plugin Registration Registration EXTERNAL GIT_REF master) # Depends on image, SofaPython, SofaGui and SofaDistanceGrid +sofa_add_external(directory SofaPython3 GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/SofaPython3.git) +sofa_add_external(plugin CGALPlugin GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/CGALPlugin.git) # Depends on image +sofa_add_external(plugin Registration GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/Registration.git) # Depends on image, SofaPython, SofaGui and SofaDistanceGrid sofa_add_subdirectory(plugin BulletCollisionDetection BulletCollisionDetection) # Depends on Compliant and LMConstraint -sofa_add_subdirectory(plugin MeshSTEPLoader MeshSTEPLoader EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin PluginExample PluginExample EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin ManifoldTopologies ManifoldTopologies EXTERNAL GIT_REF master) +sofa_add_external(plugin MeshSTEPLoader GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/MeshSTEPLoader.git) +sofa_add_external(plugin PluginExample GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/PluginExample.git) +sofa_add_external(plugin ManifoldTopologies GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/ManifoldTopologies.git) sofa_add_subdirectory(plugin SixenseHydra SixenseHydra) sofa_add_subdirectory(plugin SofaOpenCL SofaOpenCL) sofa_add_subdirectory(plugin Xitact Xitact) @@ -40,21 +40,21 @@ sofa_add_subdirectory(plugin LeapMotion LeapMotion) sofa_add_subdirectory(plugin Geomagic Geomagic) sofa_add_subdirectory(plugin SofaAssimp SofaAssimp) # ColladaSceneLoader Depends on Flexible and image sofa_add_subdirectory(plugin SofaMatrix SofaMatrix) # Depends on image, CImgPlugin -sofa_add_subdirectory(plugin BeamAdapter BeamAdapter EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin STLIB STLIB EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin SoftRobots SoftRobots EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin Cosserat Cosserat EXTERNAL GIT_REF master) # Cosserat has an optional dependency on SoftRobots -sofa_add_subdirectory(plugin CollisionAlgorithm CollisionAlgorithm EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin ConstraintGeometry ConstraintGeometry EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin ShapeMatchingPlugin ShapeMatchingPlugin EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin CSparseSolvers CSparseSolvers EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin ModelOrderReduction ModelOrderReduction EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin Sofa.Metis Sofa.Metis EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin SofaValidation SofaValidation EXTERNAL GIT_REF master) +sofa_add_external(plugin BeamAdapter GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/BeamAdapter.git) +sofa_add_external(plugin STLIB GIT_REF master GIT_REPOSITORY https://www.github.com/SofaDefrost/STLIB.git) +sofa_add_external(plugin SoftRobots GIT_REF master GIT_REPOSITORY https://www.github.com/SofaDefrost/SoftRobots.git) +sofa_add_external(plugin Cosserat GIT_REF master GIT_REPOSITORY https://www.github.com/SofaDefrost/Cosserat.git) # Cosserat has an optional dependency on SoftRobots +sofa_add_external(plugin CollisionAlgorithm GIT_REF master GIT_REPOSITORY https://forge.icube.unistra.fr/sofa/CollisionAlgorithm.git) +sofa_add_external(plugin ConstraintGeometry GIT_REF master GIT_REPOSITORY https://forge.icube.unistra.fr/sofa/ConstraintGeometry.git) +sofa_add_external(plugin ShapeMatchingPlugin GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/ShapeMatchingPlugin.git) +sofa_add_external(plugin CSparseSolvers GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/CSparseSolvers.git) +sofa_add_external(plugin ModelOrderReduction GIT_REF master GIT_REPOSITORY https://www.github.com/SofaDefrost/ModelOrderReduction.git) +sofa_add_external(plugin Sofa.Metis GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/Sofa.Metis.git) +sofa_add_external(plugin SofaValidation GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/SofaValidation.git) -sofa_add_subdirectory(plugin PSL PSL EXTERNAL GIT_REF master) +sofa_add_external(plugin PSL GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/PSL.git) if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux")) sofa_add_subdirectory(plugin SofaPardisoSolver SofaPardisoSolver) # SofaPardisoSolver is only available under linux with gcc diff --git a/applications/plugins/CSparseSolvers/ExternalProjectConfig.cmake.in b/applications/plugins/CSparseSolvers/ExternalProjectConfig.cmake.in deleted file mode 100644 index 873f2af4e97..00000000000 --- a/applications/plugins/CSparseSolvers/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(CSparseSolvers - GIT_REPOSITORY https://github.com/sofa-framework/CSparseSolvers - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/CSparseSolvers" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/CollisionAlgorithm/ExternalProjectConfig.cmake.in b/applications/plugins/CollisionAlgorithm/ExternalProjectConfig.cmake.in deleted file mode 100644 index 1d6cfd5fa5b..00000000000 --- a/applications/plugins/CollisionAlgorithm/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(CollisionAlgorithm - GIT_REPOSITORY https://forge.icube.unistra.fr/sofa/CollisionAlgorithm.git - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/CollisionAlgorithm" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/ConstraintGeometry/ExternalProjectConfig.cmake.in b/applications/plugins/ConstraintGeometry/ExternalProjectConfig.cmake.in deleted file mode 100644 index 9dcb490a520..00000000000 --- a/applications/plugins/ConstraintGeometry/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(ConstraintGeometry - GIT_REPOSITORY https://forge.icube.unistra.fr/sofa/ConstraintGeometry.git - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/ConstraintGeometry" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/Cosserat/ExternalProjectConfig.cmake.in b/applications/plugins/Cosserat/ExternalProjectConfig.cmake.in deleted file mode 100644 index 47c5d00b0b8..00000000000 --- a/applications/plugins/Cosserat/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(Cosserat - GIT_REPOSITORY https://github.com/SofaDefrost/Cosserat - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/Cosserat" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/ManifoldTopologies/ExternalProjectConfig.cmake.in b/applications/plugins/ManifoldTopologies/ExternalProjectConfig.cmake.in deleted file mode 100644 index 83340879f74..00000000000 --- a/applications/plugins/ManifoldTopologies/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(ManifoldTopologies - GIT_REPOSITORY https://github.com/sofa-framework/ManifoldTopologies - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/ManifoldTopologies" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/MeshSTEPLoader/ExternalProjectConfig.cmake.in b/applications/plugins/MeshSTEPLoader/ExternalProjectConfig.cmake.in deleted file mode 100644 index a8f24844c3c..00000000000 --- a/applications/plugins/MeshSTEPLoader/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(MeshSTEPLoader - GIT_REPOSITORY https://github.com/sofa-framework/MeshSTEPLoader - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/MeshSTEPLoader" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/ModelOrderReduction/ExternalProjectConfig.cmake.in b/applications/plugins/ModelOrderReduction/ExternalProjectConfig.cmake.in deleted file mode 100644 index f38b32709ea..00000000000 --- a/applications/plugins/ModelOrderReduction/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(ModelOrderReduction - GIT_REPOSITORY https://github.com/SofaDefrost/ModelOrderReduction - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/ModelOrderReduction" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/PSL/ExternalProjectConfig.cmake.in b/applications/plugins/PSL/ExternalProjectConfig.cmake.in deleted file mode 100644 index ce8cc694507..00000000000 --- a/applications/plugins/PSL/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(PSL - GIT_REPOSITORY https://github.com/sofa-framework/PSL - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/PSL" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/PluginExample/ExternalPluginExample.md b/applications/plugins/PluginExample/ExternalPluginExample.md deleted file mode 100644 index 3222e79cc7a..00000000000 --- a/applications/plugins/PluginExample/ExternalPluginExample.md +++ /dev/null @@ -1,11 +0,0 @@ -# External PluginExample - -This example of plugin has been converted to an external repository, and it is used as a showcase of: - - how to write a plugin for SOFA (CMake, file structure, code) - - how to configure the plugin to be fetchable from CMake. - -The content of the plugin is now located at: https://github.com/sofa-framework/PluginExample - -The associated *ExternalProjectConfig.cmake.in* describes how to fetch from an repostitory, automatically at the cmake configure time. -Finally, one has to declare this plugin in the root CMakefile, where he will declare this plugin as external, using *add_sofa_plugin_external( )* -Once fetched, this directory will be populated with the current code pointed in the *ExternalProjectConfig.cmake.in* file. diff --git a/applications/plugins/PluginExample/ExternalProjectConfig.cmake.in b/applications/plugins/PluginExample/ExternalProjectConfig.cmake.in deleted file mode 100644 index 96df21096c5..00000000000 --- a/applications/plugins/PluginExample/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(PluginExample - GIT_REPOSITORY https://github.com/sofa-framework/PluginExample - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/PluginExample" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/Registration/ExternalProjectConfig.cmake.in b/applications/plugins/Registration/ExternalProjectConfig.cmake.in deleted file mode 100644 index 47b16bfff8c..00000000000 --- a/applications/plugins/Registration/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(Registration - GIT_REPOSITORY https://github.com/sofa-framework/Registration - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/Registration" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/RegressionStateScenes.regression-tests b/applications/plugins/RegressionStateScenes.regression-tests index 806192894f1..7fd66a0ade6 100644 --- a/applications/plugins/RegressionStateScenes.regression-tests +++ b/applications/plugins/RegressionStateScenes.regression-tests @@ -2,8 +2,17 @@ # REGRESSION_TEST DOES NOT SUPPORT DASHES ("-") IN SCENE NAMES. # USE UNDERSCORES ("_") INSTEAD. +# The file contains the path to the reference folder. This path should be relative to this folder path. The folder +# should be structured as the folder containig this file and each reference of each scene should have a relative path to +# the reference folder equivalent to the relative path of the corresponding scene in this folder. e.g. for the scene in +# path/to/MyScene.scn, a reference with the same name as the scene should be found in referenceFolder/path/to/ +# --> INFO : a special string can be use while specifying this path: `$REGRESSION_DIR`. If used at the beginning of the +# path, then it will be used as an absolute path with $REGRESSION_DIR replaced by the content of the environment +# variable with the same name. Use this, when the reference are not in the repository containing the examples but +# directly in the repo Regression + ### References relative path ### -../projects/Regression/references/applications/plugins +$REGRESSION_DIR/references/applications/plugins ### MultiThreading ### diff --git a/applications/plugins/STLIB/ExternalProjectConfig.cmake.in b/applications/plugins/STLIB/ExternalProjectConfig.cmake.in deleted file mode 100644 index bf4aeb68fc9..00000000000 --- a/applications/plugins/STLIB/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(STLIB - GIT_REPOSITORY https://github.com/SofaDefrost/STLIB - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/STLIB" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/ShapeMatchingPlugin/ExternalProjectConfig.cmake.in b/applications/plugins/ShapeMatchingPlugin/ExternalProjectConfig.cmake.in deleted file mode 100644 index 3536891a608..00000000000 --- a/applications/plugins/ShapeMatchingPlugin/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(ShapeMatchingPlugin - GIT_REPOSITORY https://github.com/sofa-framework/ShapeMatchingPlugin - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/ShapeMatchingPlugin" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/Sofa.Metis/ExternalProjectConfig.cmake.in b/applications/plugins/Sofa.Metis/ExternalProjectConfig.cmake.in deleted file mode 100644 index 999b95482f8..00000000000 --- a/applications/plugins/Sofa.Metis/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(Sofa.Metis - GIT_REPOSITORY https://github.com/sofa-framework/Sofa.Metis - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/Sofa.Metis" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/SofaHighOrder/ExternalProjectConfig.cmake.in b/applications/plugins/SofaHighOrder/ExternalProjectConfig.cmake.in deleted file mode 100644 index 48c0327a7a8..00000000000 --- a/applications/plugins/SofaHighOrder/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(SofaHighOrder - GIT_REPOSITORY https://github.com/sofa-framework/SofaHighOrder - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/SofaHighOrder" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/SofaPython3/ExternalProjectConfig.cmake.in b/applications/plugins/SofaPython3/ExternalProjectConfig.cmake.in deleted file mode 100644 index d8514e56409..00000000000 --- a/applications/plugins/SofaPython3/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(SofaPython3 - GIT_REPOSITORY https://github.com/sofa-framework/SofaPython3 - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/SofaPython3" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/SofaSphFluid/ExternalProjectConfig.cmake.in b/applications/plugins/SofaSphFluid/ExternalProjectConfig.cmake.in deleted file mode 100644 index 74b21621e47..00000000000 --- a/applications/plugins/SofaSphFluid/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(SofaSphFluid - GIT_REPOSITORY https://github.com/sofa-framework/SofaSphFluid - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/SofaSphFluid" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/SofaValidation/ExternalProjectConfig.cmake.in b/applications/plugins/SofaValidation/ExternalProjectConfig.cmake.in deleted file mode 100644 index c03db32905c..00000000000 --- a/applications/plugins/SofaValidation/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(SofaValidation - GIT_REPOSITORY https://github.com/sofa-framework/SofaValidation - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/SofaValidation" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/plugins/SoftRobots/ExternalProjectConfig.cmake.in b/applications/plugins/SoftRobots/ExternalProjectConfig.cmake.in deleted file mode 100644 index 0b592bcd67c..00000000000 --- a/applications/plugins/SoftRobots/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.22) - -include(ExternalProject) -ExternalProject_Add(SoftRobots - GIT_REPOSITORY https://github.com/SofaDefrost/SoftRobots - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/plugins/SoftRobots" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/applications/projects/CMakeLists.txt b/applications/projects/CMakeLists.txt index 38605d075b1..5fc82555379 100644 --- a/applications/projects/CMakeLists.txt +++ b/applications/projects/CMakeLists.txt @@ -5,9 +5,10 @@ sofa_add_subdirectory(application Modeler Modeler OFF) sofa_add_subdirectory(application SofaPhysicsAPI SofaPhysicsAPI) -sofa_add_subdirectory(directory SofaGLFW SofaGLFW EXTERNAL GIT_REF master) -sofa_add_subdirectory(plugin Sofa.Qt Sofa.Qt EXTERNAL GIT_REF master OFF) +sofa_add_external(directory SofaGLFW GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/SofaGLFW.git) +sofa_add_external(plugin Sofa.Qt GIT_REF master OFF GIT_REPOSITORY https://www.github.com/sofa-framework/Sofa.Qt.git) sofa_add_subdirectory(application runSofa runSofa ON) -sofa_add_subdirectory(directory Regression Regression EXTERNAL GIT_REF master) +sofa_add_external(directory Regression GIT_REF master GIT_REPOSITORY https://www.github.com/sofa-framework/Regression.git) sofa_add_subdirectory(application sofaProjectExample sofaProjectExample) + diff --git a/applications/projects/Regression/ExternalProjectConfig.cmake.in b/applications/projects/Regression/ExternalProjectConfig.cmake.in deleted file mode 100644 index 9d1b66e6dd3..00000000000 --- a/applications/projects/Regression/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 2.8.2) - -include(ExternalProject) -ExternalProject_Add(Regression - GIT_REPOSITORY https://github.com/sofa-framework/regression - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/projects/Regression" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) - \ No newline at end of file diff --git a/applications/projects/Sofa.Qt/ExternalProjectConfig.cmake.in b/applications/projects/Sofa.Qt/ExternalProjectConfig.cmake.in deleted file mode 100644 index a142386d33f..00000000000 --- a/applications/projects/Sofa.Qt/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 2.8.2) - -include(ExternalProject) -ExternalProject_Add(Regression - GIT_REPOSITORY https://github.com/sofa-framework/Sofa.Qt - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/projects/Sofa.Qt" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) - \ No newline at end of file diff --git a/applications/projects/SofaGLFW/ExternalProjectConfig.cmake.in b/applications/projects/SofaGLFW/ExternalProjectConfig.cmake.in deleted file mode 100644 index 22d1eaf4f1c..00000000000 --- a/applications/projects/SofaGLFW/ExternalProjectConfig.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.11) - -include(ExternalProject) -ExternalProject_Add(SofaGLFW - GIT_REPOSITORY https://github.com/sofa-framework/SofaGLFW - GIT_TAG origin/@ARG_GIT_REF@ - SOURCE_DIR "${CMAKE_SOURCE_DIR}/applications/projects/SofaGLFW" - BINARY_DIR "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - GIT_CONFIG "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/pr/*" -) diff --git a/examples/RegressionStateScenes.regression-tests b/examples/RegressionStateScenes.regression-tests index cd9a7bb6319..1d4795d3555 100644 --- a/examples/RegressionStateScenes.regression-tests +++ b/examples/RegressionStateScenes.regression-tests @@ -7,9 +7,19 @@ # WARNING: # REGRESSION_TEST DOES NOT SUPPORT DASHES ("-") IN SCENE NAMES. # USE UNDERSCORES ("_") INSTEAD. +# +# The file contains the path to the reference folder. This path should be relative to this folder path. The folder +# should be structured as the folder containig this file and each reference of each scene should have a relative path to +# the reference folder equivalent to the relative path of the corresponding scene in this folder. e.g. for the scene in +# path/to/MyScene.scn, a reference with the same name as the scene should be found in referenceFolder/path/to/ +# --> INFO : a special string can be use while specifying this path: `$REGRESSION_DIR`. If used at the beginning of the +# path, then it will be used as an absolute path with $REGRESSION_DIR replaced by the content of the environment +# variable with the same name. Use this, when the reference are not in the repository containing the examples but +# directly in the repo Regression + ### References relative path ### -../applications/projects/Regression/references/examples +$REGRESSION_DIR/references/examples ### Demo scenes ### Demos/TriangleSurfaceCutting.scn 100 1e-4 1 1 diff --git a/examples/RegressionTopologyScenes.regression-tests b/examples/RegressionTopologyScenes.regression-tests index a789f64974a..8cae0b9adb3 100644 --- a/examples/RegressionTopologyScenes.regression-tests +++ b/examples/RegressionTopologyScenes.regression-tests @@ -3,7 +3,7 @@ # USE UNDERSCORES ("_") INSTEAD. ### References relative path ### -../applications/projects/Regression/references/examples +$REGRESSION_DIR/references/examples ### Topology scenes ### Component/Topology/Mapping/Tetra2TriangleTopologicalMapping.scn 30 1e-4 1