CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to add comment line in Make/files

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2021, 04:56
Default How to add comment line in Make/files
  #1
New Member
 
Youjiang Wang
Join Date: Apr 2015
Location: Hamburg
Posts: 22
Rep Power: 11
wyj216 is on a distinguished road
I just want to comment out some lines to accelerate the compile during the development. I tried #, wmake complaint "invalid preprocessing directive #...". I also tried //, but did not work.
wyj216 is offline   Reply With Quote

Old   July 21, 2021, 07:46
Default
  #2
Member
 
Join Date: Jun 2019
Posts: 41
Rep Power: 6
Voulet is on a distinguished road
Not sure about this but can you try -- space before a file name?
Voulet is offline   Reply With Quote

Old   July 21, 2021, 08:52
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by wyj216 View Post
I just want to comment out some lines to accelerate the compile during the development. I tried #, wmake complaint "invalid preprocessing directive #...". I also tried //, but did not work.

The Make/files, Make/options are passed through cpp (pre-processor). Use C-style comments and all should be fine. Eg,
Code:
sinclude $(GENERAL_RULES)/module-path-user

/* Failsafe - user location */
ifeq (,$(strip $(FOAM_MODULE_APPBIN)))
    FOAM_MODULE_APPBIN = $(FOAM_USER_APPBIN)
endif
ifeq (,$(strip $(FOAM_MODULE_LIBBIN)))
    FOAM_MODULE_LIBBIN = $(FOAM_USER_LIBBIN)
endif

/* Python */
PY_INCS := \
    -Wno-old-style-cast \
    -I/usr/include/python3.6m \
    -I/usr/lib64/python3.6/site-packages/numpy/core/include \
    -I/usr/local/lib/python3.6/dist-packages/numpy/core/include

PY_LIBS := \
    -lpython3.6m

#if defined(OPENFOAM) && (OPENFOAM < 2012)
    /* ... something older ... */
#endif

 
/* ... later on */
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    $(PY_INCS)
reverseila and überschwupper like this.
olesen is offline   Reply With Quote

Old   July 21, 2021, 11:01
Default
  #4
New Member
 
Youjiang Wang
Join Date: Apr 2015
Location: Hamburg
Posts: 22
Rep Power: 11
wyj216 is on a distinguished road
Thank you, Mark. This works perfectly.
wyj216 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[OpenFOAM] ParaView command in Foam-extend-4.1 mitu_94 ParaView 0 March 4, 2021 13:46
[OpenFOAM] Take derivative of mean velocity in paraFoam hiuluom ParaView 13 April 26, 2016 06:44
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42


All times are GMT -4. The time now is 16:49.