Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ricardo_F_1
Beginner
142 Views

-P doesn't produce .i files in ICC

hi, i can't produce the preprocessed files with -P on my project compiling with ICC: https://github.com/riclas/rstm in order to compile it with -P just change the line: set(rstm_init_cxx_flags -Wall) to: set(rstm_init_cxx_flags -Wall -P) in file: cmake/UserOverrides.cmake then follow the readme instructions, but with CC=icc and CXX=icpc I've tried with a simple "hello world" and the .i file is produced, so this must be something related to the other compiler options of my project... ? with GCC and -P -save-temps it creates the appropriate .ii files.
0 Kudos
2 Replies
Judith_W_Intel
Employee
142 Views

 

One thing that's confusing about the -P option is that if you use it with the -o option then the preprocessed output is put in the filename specified with -o. Is that what is happening?

Judy

 

Ricardo_F_1
Beginner
142 Views

indeed that is what is happening. the project uses -o to give the .o files name, and with -P it is saving the preprocessed file. This is more confusing than it should be...

Thank you again judith.

Reply