Changeset 62 for sources/configure.ac


Ignore:
Timestamp:
Feb 16, 2017, 3:46:11 PM (8 years ago)
Author:
meunier
Message:
  • Functional (or supposedly functional) OpenMP support configure must be run with --enable-use-omp and the topcell must define the USE_OPENMP flag before including the .h files of systemcass (if openmp enabled).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/configure.ac

    r50 r62  
    3838
    3939MY_ARG_ENABLE(debug, [Enable debugging], [no])
     40MY_ARG_ENABLE(use_omp, [Compile with OpenMP activated], [no])
    4041
    4142MY_ARG_ENABLE(default_runtime_compilation, [Compile scheduling code], [no])
    4243
    4344# Also set -DNDEBUG when not debugging, this disables assert()s
    44 AS_IF([test "x$do_debug"  = "xyes"], [CXXFLAGS="-g"         ],
     45AS_IF([test "x$do_debug"  = "xyes"], [CXXFLAGS="-g"],
    4546      [test "x$do_debug" != "xyes"], [CXXFLAGS="-O2 -DNDEBUG"])
     47
     48AS_IF([test "x$do_use_omp"  = "xyes"], [CXXFLAGS+=" -DUSE_OPENMP"],
     49      [test "x$do_use_omp" != "xyes"], [CXXFLAGS+=""])
    4650
    4751case $target_os in
     
    9094
    9195# OpenMP
    92 AC_OPENMP([C])
    93 AC_CHECK_LIB(dl, dlopen, , )
    94 AC_CHECK_LIB(gomp, omp_get_thread_num, , )
     96AS_IF([test "x$do_use_omp" = "xyes"],
     97    [AC_OPENMP([C])
     98    AC_CHECK_LIB(dl, dlopen, , )
     99    AC_CHECK_LIB(gomp, omp_get_thread_num, , )]
     100)
    95101
    96102AM_CONDITIONAL(BUILD_DOCS,
Note: See TracChangeset for help on using the changeset viewer.