Skip to content
Snippets Groups Projects
Select Git revision
  • 60fe12c9c7cc21def773ba20df8497d02206f31b
  • master default
  • irony
3 results

Configuration.org

Blame
  • CMakeLists.txt 3.03 KiB
    include_directories("${PUGS_BINARY_DIR}/src/utils")
    set(EXECUTABLE_OUTPUT_PATH ${PUGS_BINARY_DIR})
    
    add_executable (unit_tests
      test_main.cpp
      test_AffectationProcessor.cpp
      test_AffectationToStringProcessor.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_ASTNodeCFunctionExpressionBuilder.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_CFunctionEmbedder.cpp
      test_CFunctionEmbedderTable.cpp
      test_CFunctionProcessor.cpp
      test_CMathModule.cpp
      test_ContinueProcessor.cpp
      test_ConcatExpressionProcessor.cpp
      test_CRSMatrix.cpp
      test_DataVariant.cpp
      test_DoWhileProcessor.cpp
      test_ExecutionPolicy.cpp
      test_FakeProcessor.cpp
      test_ForProcessor.cpp
      test_FunctionProcessor.cpp
      test_FunctionTable.cpp
      test_IfProcessor.cpp
      test_IncDecExpressionProcessor.cpp
      test_INodeProcessor.cpp
      test_ItemType.cpp
      test_NameProcessor.cpp
      test_OStreamProcessor.cpp
      test_PCG.cpp
      test_PugsAssert.cpp
      test_RevisionInfo.cpp
      test_SparseMatrixDescriptor.cpp
      test_SymbolTable.cpp
      test_TinyMatrix.cpp
      test_TinyVector.cpp
      test_UnaryExpressionProcessor.cpp
      test_Vector.cpp
      test_WhileProcessor.cpp
      )
    
    add_executable (mpi_unit_tests
      mpi_test_main.cpp
      mpi_test_Messenger.cpp
      )
    
    target_link_libraries (unit_tests
      PugsLanguage
      PugsUtils
      kokkos
      Catch2
      )
    
    target_link_libraries (mpi_unit_tests
      PugsUtils
      kokkos
      ${PARMETIS_LIBRARIES}
      ${MPI_CXX_LINK_FLAGS} ${MPI_CXX_LIBRARIES}
      Catch2
      )
    
    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)