Comments (3)
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.
Thanks for the advice.
I just made a PR.
As for your question,
- 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.
- 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.
- 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.
Closing, as discussion is moved to PR (#58)
from ycm-generator.
Related Issues (20)
- unwanted flag "c++" in the flags HOT 1
- Possible to support alternative compiler for cross compiler such as ARM, POWERPC ? HOT 1
- Stucked on Linux kernel of version 4.9-rc8
- 'CC=gcc-7' inside Makefile does not work , while 'CC=gcc' does. (ERROR: no commands ... ) HOT 1
- meson/ninja generator creates incorrect include paths HOT 1
- How to set external library dir
- ERROR: No commands were logged to the build logs HOT 1
- test for generating configuration file for linux kernel is slow HOT 1
- ERROR: Unknown build system HOT 4
- Compatible with Conan HOT 2
- E464: Ambiguous use of user-defined command: Plug 'rdnetto/YCM-Generator' , { 'branch': 'stable'} HOT 1
- Package not found via config_gen HOT 4
- ld in fake-toolchain must work properly HOT 2
- ESP32 IDF and YCM-Generator not working well together HOT 5
- Does YCM-Generator support transform compile_commands.json to .color_coded
- Does this plugin support python 3?
- The template file for .ycm_extra_conf.py should be changed for clangd changed
- .vimrc imap <C-n> <Down>, when type "return 0;", then "<C-n> cant use anymore HOT 1
- Missing verb in README.md
- Doesn't seem to work with Kbuild (Linux Kernel build system)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ycm-generator.