Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/22/2024
Public
Document Table of Contents

x (type option)

Tells the compiler that all source files found subsequent to -x type should be recognized as a particular type.

Syntax

Linux:

-x type

Windows:

None

Arguments

type

Is the type of source file. Possible values are:

c++

A C++ source file

c++-header

A C++ header file

c++-cpp-output

A C++ pre-processed file

c

A C source file

c-header

A C header file

cpp-output

A C pre-processed file

assembler

An Assembly file

assembler-with-cpp

An Assembly file that needs to be preprocessed

none

Disables recognition, and reverts to the file extension.

Default

OFF

The type of source files is not changed.

Description

Tells the compiler that all source files found subsequent to -x type should be recognized as a particular type.

IDE Equivalent

None

Alternate Options

None

Example

Consider that you want to compile the following C and C++ source files whose extensions are not recognized by the compiler:

File Name

Language

file1.c99

C

file2.cplusplus

C++

And you also want to include these files whose extensions are recognized:

File Name

Language

file3.c

C

file4.cpp

C++

The following is the command-line invocation:

icpx -x c file1.c99 -x c++ file2.cplusplus -x none file3.c file4.cpp