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

why wmake not listen to me?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2017, 20:33
Default why wmake not listen to me?
  #1
Member
 
Ran
Join Date: Aug 2016
Posts: 69
Rep Power: 9
random_ran is on a distinguished road
Greeting:

why wmake always link those two folders?

/src/OpenFOAM/ and /src/OSspecific/

even my own application code, is simple like this:

Code:
/*---------------------------------------------------------------------------*\                                                                                                                  
  =========                 |                                                                                                                                                                    
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox                                                                                                                              
   \\    /   O peration     |                                                                                                                                                                    
    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation                                                                                                                        
     \\/     M anipulation  |                                                                                                                                                                    
-------------------------------------------------------------------------------                                                                                                                  
License                                                                                                                                                                                          
    This file is part of OpenFOAM.                                                                                                                                                               
                                                                                                                                                                                                 
    OpenFOAM is free software: you can redistribute it and/or modify it                                                                                                                          
    under the terms of the GNU General Public License as published by                                                                                                                            
    the Free Software Foundation, either version 3 of the License, or                                                                                                                            
    (at your option) any later version.                                                                                                                                                          
                                                                                                                                                                                                 
    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT                                                                                                                      
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or                                                                                                                        
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License                                                                                                                        
    for more details.                                                                                                                                                                            
                                                                                                                                                                                                 
    You should have received a copy of the GNU General Public License                                                                                                                            
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.                                                                                                                            
                                                                                                                                                                                                 
\*---------------------------------------------------------------------------*/
int main(int argc, char *argv[])
{
    return 0;
}

// ************************************************************************* //
There's nothing in Make/options.

And in Make/files:

Code:
Of4Fun.C

EXE = $(FOAM_USER_APPBIN)/Of4Fun.C
Then do this:


Code:
$ wmake

Making dependency list for source file OF4Fun.C
OMPI_CXX="icpc" mpicxx -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -diag-disable 654,1125,2304 -O2 -xCore-AVX2 -ftz -fp-speculation=safe -fp-model source -std=c++11 -no-prec-div  -DNoRepository  -IlnInclude -I. -I/cvmfs/*/easybuild/software/2017/avx2/MPI/intel2016.4/openmpi2.1/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/cvmfs/*/easybuild/software/2017/avx2/MPI/intel2016.4/openmpi2.1/openfoam/4.1/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude
What I really want to do is to tell computer not link /src/OpenFOAM and /src/OSspecific from that default path.


Any idea?

Last edited by wyldckat; December 30, 2017 at 11:13. Reason: Added [CODE][/CODE] markers
random_ran is offline   Reply With Quote

Old   November 29, 2017, 16:36
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

These folders are added by wmake, because it is written in the rules (https://github.com/OpenFOAM/OpenFOAM...cc/c%2B%2B#L15).

And since, Make/options file are included into Makefile after preprocessing with cpp, you can redefine variables there. So, to avoid addition of those extra folders, you can add the following line in your Make/options (original - $(LIB_HEADER_DIRS)):

Code:
c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) -fPIC
random_ran likes this.
alexeym 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
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 08:48
Problems Installing OF 1.6 32 bit bucksfan OpenFOAM Installation 19 August 4, 2009 01:36
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 04:41
Problem of compilation OF 14Allwmake command not found erik_d OpenFOAM Bugs 13 September 13, 2008 21:45
[OpenFOAM] ParaFoam error message joey ParaView 1 October 2, 2006 13:28


All times are GMT -4. The time now is 04:39.