Files
create/tests/CMakeLists.txt
David Carter 902af79514 Material: Material handling enhancements
Rework of the material handling system.

This first part concntrates on a rework of the material cards.
Rather than use a fixed list of possible properties, properties can
be defined separately in their own files and mixed to provide a
complete list of possible properties. Properties can be inherited.

The cards then provide values for the properties. These can also
be inherited allowing for small changes in cards as required.

The new property definitions are more extensive than previously.
2 and 3 dimensional arrays of properties can be defined. Values
are obtained by calling an API instead of reading from a dictionary.

For compatibility, a Python dictionary of values can be obtained
similar to how it was done previously, but this is considered a
deprecated API and won't support the newer advanced features.

The editor is completely reworked. It will be able to edit older format
material cards, but can only save them in the new format.

For testing during the development phase, a system preference can
specifiy wether the old or new material editors are to be used. This
option will be removed before release.
2023-09-25 11:04:01 -04:00

88 lines
2.2 KiB
CMake

if(MSVC)
add_compile_options(/wd4251)
option(
gtest_force_shared_crt
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
ON)
set(Google_Tests_LIBS
oldnames.lib
debug msvcrtd.lib
debug msvcprtd.lib
optimized msvcrt.lib
optimized msvcprt.lib
)
# Universal C runtime introduced in VS 2015 (cl version 19)
if(NOT(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19"))
list(APPEND Google_Tests_LIBS
debug vcruntimed.lib
debug ucrtd.lib
debug concrtd.lib
optimized vcruntime.lib
optimized ucrt.lib
optimized concrt.lib
)
endif()
endif()
if(WIN32)
add_definitions(-DCOIN_DLL)
endif(WIN32)
if(NOT BUILD_DYNAMIC_LINK_PYTHON)
list(APPEND Google_Tests_LIBS
${PYTHON_LIBRARIES}
)
endif()
set(CMAKE_AUTOMOC ON)
function(setup_qt_test)
foreach(_testname ${ARGN})
add_executable(${_testname}_Tests_run ${_testname}.cpp)
add_test(NAME ${_testname}_Tests_run COMMAND ${_testname}_Tests_run)
if(NOT BUILD_DYNAMIC_LINK_PYTHON)
list(APPEND ${_testname}_LIBS
${PYTHON_LIBRARIES}
)
endif()
target_include_directories(${_testname}_Tests_run PUBLIC
${Python3_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
${QtGui_INCLUDE_DIRS}
${QtWidgets_INCLUDE_DIRS}
${QtTest_INCLUDE_DIRS}
${COIN3D_INCLUDE_DIRS})
target_link_libraries(${_testname}_Tests_run
FreeCADApp
FreeCADGui
${QtCore_LIBRARIES}
${QtWidgets_LIBRARIES}
${QtTest_LIBRARIES}
${${_testname}_LIBS})
endforeach()
endfunction()
add_executable(Tests_run)
add_executable(Material_tests_run)
add_executable(Mesh_tests_run)
add_executable(Part_tests_run)
add_executable(Points_tests_run)
add_executable(Sketcher_tests_run)
add_subdirectory(lib)
add_subdirectory(src)
target_include_directories(Tests_run PUBLIC
${Python3_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
)
target_link_libraries(Tests_run
gtest_main
gmock_main
${Google_Tests_LIBS}
FreeCADApp
)