Skip to content

Commit eef6747

Browse files
authored
[CMake] CLEAN test resources location (still in bin) (#193)
* [CMake] CLEAN test resources location (still in bin) * [CMake] Add ".d" suffix to please Unix * [CMake] Add ".d" suffix to please Unix (2)
1 parent 6257993 commit eef6747

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

bindings/Modules/tests/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ foreach(dir_binding ${DIR_BINDING_LIST})
3434
endif()
3535
if (_isMultiConfig) # MSVC
3636
foreach(config_type ${CMAKE_CONFIGURATION_TYPES})
37-
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${dir_binding})
38-
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY})
37+
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${PROJECT_NAME}.d/${dir_binding})
38+
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${PROJECT_NAME}.d/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d)
3939
endforeach()
4040
else()
41-
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${dir_binding})
42-
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY})
41+
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/${dir_binding})
42+
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d)
4343
endif()
4444
endforeach()
4545

bindings/Modules/tests/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static struct Tests : public sofapython3::PythonTestExtractor
3838
MessageDispatcher::addHandler(&MainPerComponentLoggingMessageHandler::getInstance()) ;
3939

4040
const std::string executable_directory = sofa::helper::Utils::getExecutableDirectory();
41-
addTestDirectory(executable_directory+"/SofaBaseTopology", "SofaBaseTopology_");
42-
addTestDirectory(executable_directory+"/SofaDeformable", "SofaDeformable_");
41+
addTestDirectory(executable_directory+"/Bindings.Modules.Tests.d/SofaBaseTopology", "SofaBaseTopology_");
42+
addTestDirectory(executable_directory+"/Bindings.Modules.Tests.d/SofaDeformable", "SofaDeformable_");
4343
}
4444
} python_tests;
4545

bindings/Sofa/tests/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
6060
foreach(dir_binding ${DIR_BINDING_LIST})
6161
if (_isMultiConfig) # MSVC
6262
foreach(config_type ${CMAKE_CONFIGURATION_TYPES})
63-
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${dir_binding})
64-
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY})
63+
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${PROJECT_NAME}.d/${dir_binding})
64+
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${config_type}/${PROJECT_NAME}.d/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d)
6565
endforeach()
6666
else()
67-
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${dir_binding})
68-
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY})
67+
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/${dir_binding} ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/${dir_binding})
68+
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/${dir_binding} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d)
6969
endif()
7070
endforeach()
7171

bindings/Sofa/tests/PythonModule_Sofa_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ static struct PythonModule_Sofa_tests : public PythonTestExtractor
5454
PythonModule_Sofa_tests()
5555
{
5656
const std::string executable_directory = sofa::helper::Utils::getExecutableDirectory();
57-
addTestDirectory(executable_directory+"/Core", "Sofa_Core_");
58-
addTestDirectory(executable_directory+"/Helper", "Sofa_Helper_");
59-
addTestDirectory(executable_directory+"/Simulation", "Sofa_Simulation_");
60-
addTestDirectory(executable_directory+"/Types", "Sofa_Types_");
61-
addTestDirectory(executable_directory+"/Components", "Sofa_Components_");
57+
addTestDirectory(executable_directory+"/Bindings.Sofa.Tests.d/Core", "Sofa_Core_");
58+
addTestDirectory(executable_directory+"/Bindings.Sofa.Tests.d/Helper", "Sofa_Helper_");
59+
addTestDirectory(executable_directory+"/Bindings.Sofa.Tests.d/Simulation", "Sofa_Simulation_");
60+
addTestDirectory(executable_directory+"/Bindings.Sofa.Tests.d/Types", "Sofa_Types_");
61+
addTestDirectory(executable_directory+"/Bindings.Sofa.Tests.d/Components", "Sofa_Components_");
6262
}
6363
} python_tests;
6464

bindings/SofaRuntime/tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ sofa_auto_set_target_rpath(
2525

2626
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
2727

28-
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/SofaRuntime ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/SofaRuntime)
29-
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/SofaRuntime DESTINATION ${RUNTIME_OUTPUT_DIRECTORY})
28+
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/SofaRuntime ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/SofaRuntime)
29+
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/SofaRuntime DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d)
3030

3131
install(
3232
TARGETS ${PROJECT_NAME}

bindings/SofaRuntime/tests/PythonModule_SofaRuntime_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static struct PythonModule_Sofa_tests : public PythonTestExtractor
5454
PythonModule_Sofa_tests()
5555
{
5656
const std::string executable_directory = sofa::helper::Utils::getExecutableDirectory();
57-
addTestDirectory(executable_directory+"/SofaRuntime", "SofaRuntime_");
57+
addTestDirectory(executable_directory+"/Bindings.SofaRuntime.Tests.d/SofaRuntime", "SofaRuntime_");
5858
}
5959
} python_tests;
6060

bindings/SofaTypes/tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ sofa_auto_set_target_rpath(
2525

2626
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
2727

28-
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/pyfiles ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/pyfiles)
29-
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/pyfiles DESTINATION ${RUNTIME_OUTPUT_DIRECTORY})
28+
SP3_configure_directory(${CMAKE_CURRENT_SOURCE_DIR}/pyfiles ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/pyfiles)
29+
install(DIRECTORY ${CMAKE_BINARY_DIR}/${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d/pyfiles DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.d)
3030

3131
install(
3232
TARGETS ${PROJECT_NAME}

bindings/SofaTypes/tests/PythonModule_SofaTypes_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace
3838
PythonModule_SofaTypes_test()
3939
{
4040
const std::string executable_directory = sofa::helper::Utils::getExecutableDirectory();
41-
addTestDirectory(executable_directory+"/pyfiles", "SofaTypes_");
41+
addTestDirectory(executable_directory+"/Bindings.SofaTypes.Tests.d/pyfiles", "SofaTypes_");
4242
}
4343
} python_tests;
4444

0 commit comments

Comments
 (0)