[CMake] Flags

Marie-Christine Vallet mmvallet at ucdavis.edu
Mon Aug 6 17:52:56 EDT 2007


Hi,
I wanted to use LD an F flags for my compilation, but I cannot seem to 
find how to set them up
Thanks,
Marie


-------------------------------------------------------------------------------------------------------
In configure.ac it looked like that, I managed to get the libraries ok, 
but not the flags

#linux configuration
linux*)

    case  "${F77}" in
      ## Intel compiler
      *ifort*)
          AC_MSG_RESULT(5. ifort loop F77:$F77 CC:$CC)
          LIBRARIES="-L"`echo $DYLD_LIBRARY_PATH| awk '{ gsub(/:/, " 
-L"); print }'`
          LDFLAGS="-C -Kc++ -mp1 $LDFLAGS $LIBRARIES"
          FFLAGS="-c -u -C -mp1 -w90 -w95 -cpp $FFLAGS"
          AC_CHECK_LIB(ifcore,main,,AC_MSG_ERROR(Cannot find lib ifcore 
$LIBS))
          ;;
      *g77*)#if lib not found then stop the configuration
          LIBRARIES="-L"`locate libg2c.a | sed -e "s/libg2c.a//"`
          LDFLAGS="-O $LDFLAGS $LIBRARIES"
          FFLAGS="-c -u -O -x f77-cpp-input $FFLAGS"
          AC_CHECK_LIB([g2c], [main],,AC_MSG_ERROR(Cannot find lib g2c  
in $LIBRARIES))
          AC_CHECK_LIB(stdc++,main,,AC_MSG_ERROR(Cannot find lib stdc++))
          AC_CHECK_LIB(gcc,main,,AC_MSG_ERROR(Cannot find lib gcc))
          AC_CHECK_LIB(c,main,,AC_MSG_ERROR(Cannot find lib c))
          ;;
      esac


More information about the CMake mailing list