Skip to content
Snippets Groups Projects
Select Git revision
  • efed757a9eafb1e5a52c1eb38f1330dffdcf7ab2
  • main default protected
  • 16-include-advection-into-upstream-version
  • ml/refactor-simulation-grid
  • sh/2D-BTCS-Optimizations
  • sh/rowmajor-inplace
  • ml/sycl-impl
  • ml/restructure-api
  • stenheimbrodt-praktikum
  • ml/add-verbosity
  • fixed-point
  • improve_openmp
  • v0.4.2
  • v0.4.1
  • v0.4
  • hand-in-hp
  • v0.3
  • v0.2
  • v0.1
19 results

CMakeLists.txt

Blame
  • CMakeLists.txt 1013 B
    #debian stable (currently bullseye)
    cmake_minimum_required(VERSION 3.18)
    
    project(BTCSDiffusion CXX)
    
    set(CMAKE_CXX_STANDARD 17)
    
    find_package(Eigen3 REQUIRED NO_MODULE)
    find_package(OpenMP)
    
    ## SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -O2 -mfma")
    option(BTCS_USE_OPENMP "Compile with OpenMP support" ON)
    
    set(CMAKE_CXX_FLAGS_GENERICOPT "-O3 -march=native" CACHE STRING
     "Flags used by the C++ compiler during opt builds."
      FORCE)
    
    set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel GenericOpt."
      FORCE)
    
    option(BTCS_USE_UNSAFE_MATH_OPT
      "Use compiler options to break IEEE compliances by
        oenabling reordering of instructions when adding/multiplying of floating
        points."
      OFF)
    
    if(BTCS_USE_UNSAFE_MATH_OPT)
      add_compile_options(-ffast-math)
    endif()
    
    option(BTCS_ENABLE_TESTING
      "Run tests after succesfull compilation"
      OFF)
    
    add_subdirectory(src)
    
    if(BTCS_ENABLE_TESTING)
      add_subdirectory(test)
    endif()