Coder Social home page Coder Social logo

Comments (3)

rdnetto avatar rdnetto commented on July 29, 2024

Could you please open a PR for this? PRs make it easier to review code and preserve attribution. If you've never done so before, you can find some instructions here. You should create the PR against the develop branch.

As for the code itself, could you explain why you're passing in all the WM_ environment variables instead of just using -e?

Also, why are you setting WM_COMPILER and WM_CC to gcc instead of clang? And what about WM_CXX?

from ycm-generator.

handrake0724 avatar handrake0724 commented on July 29, 2024

Thanks for the advice.
I just made a PR.

As for your question,

  1. OpenFOAM uses wmake (bash script used in OpenFOAM) as a build system. wmake relies on a lot of environment variables starting with WM_ as below:

WM_LINK_LANGUAGE=c++
WM_ARCH=linux64
WM_OSTYPE=POSIX
WM_THIRD_PARTY_DIR=/opt/OpenFOAM/ThirdParty-3.0.1
WM_PROJECT_VERSION=3.0.1
WM_CXXFLAGS=-O3
WM_CFLAGS=-O3
WM_COMPILER_LIB_ARCH=64
WM_PROJECT_INST_DIR=/opt/OpenFOAM
WM_PROJECT_DIR=/opt/OpenFOAM/OpenFOAM-3.0.1
WM_CXX=g++
WM_LABEL_OPTION=Int32
WM_PROJECT=OpenFOAM
WM_LDFLAGS=-O3
WM_COMPILER=Gcc
WM_MPLIB=SYSTEMOPENMPI
WM_CC=gcc
WM_COMPILE_OPTION=Opt
WM_DIR=/opt/OpenFOAM/OpenFOAM-3.0.1/wmake
WM_LABEL_SIZE=32
WM_PROJECT_USER_DIR=/home/user/OpenFOAM/user-3.0.1
WM_OPTIONS=linux64GccDPInt32Opt
WM_PRECISION_OPTION=DP
WM_ARCH_OPTION=64

Also, since version 3.x.x, there were some changes in the environment variables. So, I just wanted to support all the OpenFOAM versions without knowing a specific version.

  1. OpenFOAM supports not only gcc but also intel compiler. But, I could not compile clang with intel compiler 2013 (there might be a way, though). After several tries, I just found that temporarily settting those two variables to Gcc and gcc make config_gen.py work successfully regardless compilers.
  2. Yes, you are right. setting WM_CXX to g++ may be needed (at that time, I didn't realize it cause I didn't see any problem).

from ycm-generator.

rdnetto avatar rdnetto commented on July 29, 2024

Closing, as discussion is moved to PR (#58)

from ycm-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.