COIN-OR::LEMON - Graph Library

Ticket #154: icc-detect.patch

File icc-detect.patch, 1.4 KB (added by Akos Ladanyi, 16 years ago)

9768e60aa4e1

  • configure.ac

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1223202986 -7200
    # Node ID 9768e60aa4e181f9138b4555fe6743585857834c
    # Parent  cbe3ec2d59d2d7c539ab62f2ca6796c960795237
    Properly detect the Intel C++ compiler (ticket #154).
    
    diff --git a/configure.ac b/configure.ac
    a b  
    2121
    2222lx_cmdline_cxxflags_set=${CXXFLAGS+set}
    2323
     24dnl Do compilation tests using the C++ compiler.
     25AC_LANG([C++])
     26
    2427dnl Checks for programs.
    2528AC_PROG_CXX
    2629AC_PROG_CXXCPP
     
    3134AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
    3235AC_CHECK_PROG([gs_found],[gs],[yes],[no])
    3336
     37dnl Detect Intel compiler.
     38AC_MSG_CHECKING([whether we are using the Intel C++ compiler])
     39AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER
     40choke me
     41#endif], [ICC=[yes]], [ICC=[no]])
     42if test x"$ICC" = x"yes"; then
     43  AC_MSG_RESULT([yes])
     44else
     45  AC_MSG_RESULT([no])
     46fi
     47
    3448dnl Set custom compiler flags when using g++.
    35 if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
     49if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then
    3650  CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
    3751fi
    3852