Select Git revision
CMakeLists.txt
-
Stéphane Del Pino authored
This commit introduces an OperatorRepository which handles operator to node processor builders. This gives more flexibility to operators definition (especially for incoming non basic types). This also lead to slightly faster compilation and important memory use reduction.
Stéphane Del Pino authoredThis commit introduces an OperatorRepository which handles operator to node processor builders. This gives more flexibility to operators definition (especially for incoming non basic types). This also lead to slightly faster compilation and important memory use reduction.
CMakeLists.txt 4.22 KiB
set(EXECUTABLE_OUTPUT_PATH ${PUGS_BINARY_DIR})
include_directories(${PUGS_SOURCE_DIR}/src)
include_directories(${PUGS_BINARY_DIR}/src)
include_directories(${PUGS_SOURCE_DIR}/tests)
add_executable (unit_tests
test_main.cpp
test_AffectationProcessor.cpp
test_AffectationToStringProcessor.cpp
test_AffectationToTupleProcessor.cpp
test_Array.cpp
test_ArraySubscriptProcessor.cpp
test_ArrayUtils.cpp
test_ASTBuilder.cpp
test_ASTDotPrinter.cpp
test_ASTModulesImporter.cpp
test_ASTNode.cpp
test_ASTNodeAffectationExpressionBuilder.cpp
test_ASTNodeArraySubscriptExpressionBuilder.cpp
test_ASTNodeBinaryOperatorExpressionBuilder.cpp
test_ASTNodeBuiltinFunctionExpressionBuilder.cpp
test_ASTNodeDataType.cpp
test_ASTNodeDataTypeBuilder.cpp
test_ASTNodeDataTypeChecker.cpp
test_ASTNodeDataTypeFlattener.cpp
test_ASTNodeDeclarationToAffectationConverter.cpp
test_ASTNodeEmptyBlockCleaner.cpp
test_ASTNodeExpressionBuilder.cpp
test_ASTNodeFunctionEvaluationExpressionBuilder.cpp
test_ASTNodeFunctionExpressionBuilder.cpp
test_ASTNodeIncDecExpressionBuilder.cpp
test_ASTNodeJumpPlacementChecker.cpp
test_ASTNodeListAffectationExpressionBuilder.cpp
test_ASTNodeListProcessor.cpp
test_ASTNodeNaturalConversionChecker.cpp
test_ASTNodeTypeCleaner.cpp
test_ASTNodeUnaryOperatorExpressionBuilder.cpp
test_ASTPrinter.cpp
test_ASTSymbolTableBuilder.cpp
test_ASTSymbolInitializationChecker.cpp
test_BreakProcessor.cpp
test_BinaryExpressionProcessor_arithmetic.cpp
test_BinaryExpressionProcessor_comparison.cpp
test_BinaryExpressionProcessor_equality.cpp
test_BinaryExpressionProcessor_logic.cpp
test_BiCGStab.cpp
test_BuildInfo.cpp
test_BuiltinFunctionEmbedder.cpp
test_BuiltinFunctionEmbedderTable.cpp
test_BuiltinFunctionProcessor.cpp
test_CastArray.cpp
test_ConsoleManager.cpp
test_CG.cpp
test_ContinueProcessor.cpp
test_ConcatExpressionProcessor.cpp
test_CRSGraph.cpp
test_CRSMatrix.cpp
test_DataVariant.cpp
test_Demangle.cpp
test_DoWhileProcessor.cpp
test_EmbeddedData.cpp
test_EscapedString.cpp
test_Exceptions.cpp
test_ExecutionPolicy.cpp
test_FakeProcessor.cpp
test_ForProcessor.cpp
test_FunctionArgumentConverter.cpp
test_FunctionProcessor.cpp
test_FunctionSymbolId.cpp
test_FunctionTable.cpp
test_IfProcessor.cpp
test_IncDecExpressionProcessor.cpp
test_INodeProcessor.cpp
test_ItemType.cpp
test_LinearSolver.cpp
test_LinearSolverOptions.cpp
test_ListAffectationProcessor.cpp
test_MathModule.cpp
test_NameProcessor.cpp
test_OStreamProcessor.cpp
test_ParseError.cpp
test_PugsAssert.cpp
test_PugsFunctionAdapter.cpp
test_PugsUtils.cpp
test_RevisionInfo.cpp
test_SparseMatrixDescriptor.cpp
test_SymbolTable.cpp
test_Timer.cpp
test_TinyMatrix.cpp
test_TinyVector.cpp
test_TupleToVectorProcessor.cpp
test_UnaryExpressionProcessor.cpp
test_Vector.cpp
test_WhileProcessor.cpp
)
add_executable (mpi_unit_tests
mpi_test_main.cpp
test_Messenger.cpp
test_Partitioner.cpp
)
add_library(test_Pugs_MeshDataBase
MeshDataBaseForTests.cpp)
target_link_libraries (unit_tests
test_Pugs_MeshDataBase
PugsLanguageAST
PugsLanguageModules
PugsLanguageAlgorithms
PugsLanguageUtils
PugsLanguage
PugsMesh
PugsAlgebra
PugsUtils
kokkos
${PARMETIS_LIBRARIES}
${MPI_CXX_LINK_FLAGS} ${MPI_CXX_LIBRARIES}
${PETSC_LIBRARIES}
Catch2
${PUGS_STD_LINK_FLAGS}
stdc++fs
)
target_link_libraries (mpi_unit_tests
test_Pugs_MeshDataBase
PugsAlgebra
PugsUtils
PugsLanguage
PugsLanguageAST
PugsLanguageModules
PugsLanguageAlgorithms
PugsMesh
PugsAlgebra
PugsUtils
PugsLanguageUtils PugsUtils
PugsAlgebra
PugsMesh
kokkos
${PARMETIS_LIBRARIES}
${MPI_CXX_LINK_FLAGS} ${MPI_CXX_LIBRARIES}
${PETSC_LIBRARIES}
Catch2
${PUGS_STD_LINK_FLAGS}
stdc++fs
)
enable_testing()
#parse catch tests
ParseAndAddCatchTests(unit_tests)
if(${PUGS_HAS_MPI})
set(MPIEXEC_OPTION_FLAGS --oversubscribe)
if (NOT "$ENV{GITLAB_CI}" STREQUAL "")
set(MPIEXEC_OPTION_FLAGS ${MPIEXEC_OPTION_FLAGS} --allow-run-as-root)
endif()
set(OptionalCatchTestLauncher ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 3 ${MPIEXEC_OPTION_FLAGS} --path ${PUGS_BINARY_DIR})
endif()
ParseAndAddCatchTests(mpi_unit_tests)
unset(OptionalCatchTestLauncher)