Thanks, sir.

I'd try that.

Weixiong

在 2018年2月6日星期二 UTC-8上午8:33:43,Wolfgang Bangerth写道:
>
> On 02/05/2018 11:37 PM, Weixiong Zheng wrote: 
> > 
> > What I've tried is to 
> > ADD_DEFINITION(-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}) in the 
> > CMakeLists.txt in the test directory. I tried tesing SOURCE_DIR in *.cc 
> > file like: std::cout << SOURCE_DIR << std::endl; 
> > 
> > When I did "make", screen printout shows: 
> > | 
> > "<command line>:2:20: note: expanded from here 
> > 
> > #define SOURCE_DIR /Users/GrillCheese/UCB/Research/xtrans/tests/mesh 
>
> You need to make sure that SOURCE_DIR has quotes around it. Otherwise 
> you'd have problems with spaces in file names, for example, but the 
> compiler will also not interpret the result like a string. 
>
> So something like 
> ADD_DEFINITION(-DSOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\") 
> might work, but you may have to play around with the style of quoting a 
> bit. 
>
> Best 
>   W. 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth          email:                 bang...@colostate.edu 
> <javascript:> 
>                             www: http://www.math.colostate.edu/~bangerth/ 
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to