Skip to content
Snippets Groups Projects
Select Git revision
  • c7e7a19fb887286ec2cbb0ce97f948192199f967
  • master default protected
2 results

use-package-20200618.1804.tar

Blame
  • CMakeLists.txt 1.45 KiB
    include_directories("${PUGS_BINARY_DIR}/src/utils")
    set(EXECUTABLE_OUTPUT_PATH ${PUGS_BINARY_DIR})
    
    add_executable (unit_tests
      test_main.cpp
      test_Array.cpp
      test_ArrayUtils.cpp
      test_ASTBuilder.cpp
      test_ASTDotPrinter.cpp
      test_ASTNodeDataType.cpp
      test_ASTNodeDataTypeBuilder.cpp
      test_ASTNodeDataTypeChecker.cpp
      test_ASTNodeDeclarationCleaner.cpp
      test_ASTNodeDeclarationToAffectationConverter.cpp
      test_ASTNodeJumpPlacementChecker.cpp
      test_ASTNodeValueBuilder.cpp
      test_ASTPrinter.cpp
      test_ASTSymbolTableBuilder.cpp
      test_ASTSymbolInitializationChecker.cpp
      test_ItemType.cpp
      test_PugsAssert.cpp
      test_RevisionInfo.cpp
      test_SymbolTable.cpp
      test_TinyMatrix.cpp
      test_TinyVector.cpp
      )
    
    add_executable (mpi_unit_tests
      mpi_test_main.cpp
      mpi_test_Messenger.cpp
      )
    
    target_link_libraries (unit_tests
      PugsUtils
      PugsLanguage
      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)