Skip to content

Commit

Permalink
Add support for Intel C++ Compiler 2025 - CMakeLists.txt, rst how to …
Browse files Browse the repository at this point in the history
…compile docs
  • Loading branch information
pinterf committed Dec 13, 2024
1 parent 67957fc commit 374a82f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ endif()
IF(cmake_gentoolset_lower STREQUAL "intel c++ compiler 2021" OR
cmake_gentoolset_lower STREQUAL "intel c++ compiler 2022" OR
cmake_gentoolset_lower STREQUAL "intel c++ compiler 2023" OR
cmake_gentoolset_lower STREQUAL "intel c++ compiler 2024")
cmake_gentoolset_lower STREQUAL "intel c++ compiler 2024" OR
cmake_gentoolset_lower STREQUAL "intel c++ compiler 2025")
# IntelLLVM
set(IntelLLVM_IN_VS "1")
ELSEIF(cmake_gentoolset_lower STREQUAL "intel c++ compiler 19.2")
Expand Down
1 change: 1 addition & 0 deletions distrib/Readme/readme_history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ For online documentation check https://avisynthplus.readthedocs.io/en/latest/
- #413 Add ListAutoloadDirs() script function. Returns a string with LF (\n) separated
directory list which can be displayed with Text for example.
- Update plugins section in rst docs.
- Intel C++ Compiler 2025 support in CMakeList.txt, update compile_avsplus.rst online docs


20240417 3.7.3 post ??
Expand Down
2 changes: 2 additions & 0 deletions distrib/docs/english/source/avisynthdoc/changelist374.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Build environment, Interface
- add LOONGARCH support
- (not done yet: Use system installs of DevIL and SoundTouch on all platforms, remove in-tree binaries/code)
- avisynth.h: add ListAutoloadDirs() to internal interface declarations
- CMakeList.txt to accept Intel C++ Compiler 2025

Bugfixes
~~~~~~~~
Expand Down Expand Up @@ -67,6 +68,7 @@ Documentation
- update ShowAlpha/Red/...
- Update Intel 2024 compiler build process
- Add autoload helper functions to rst docs, update content and bring syntax_plugins.rst to new format
- update compile_avsplus.rst online docs with Intel C++ Compiler 2025

Please report bugs at `github AviSynthPlus page`_ - or - `Doom9's AviSynth+
forum`_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ AviSynth+ can be built by a few different compilers:
* Clang 7.0.1 or higher.
* GCC 7 or higher.
* Intel C++ Compiler (2021-) (ICX: LLVM based NextGen)
* Intel C++ Compiler 19.2 (ICL: classic)
* Intel C++ Compiler 19.2 (ICL: classic) - discontinued by Intel


| Download and install Visual Studio Community:
Expand Down Expand Up @@ -440,6 +440,7 @@ There are two main flavours which we can use (DPC++ is not compatible with Avisy

- Intel® NextGen Compiler (in base kit, LLVM based)

- TOOLSET = "Intel C++ Compiler 2025", COMPILER EXE NAME = icx.exe
- TOOLSET = "Intel C++ Compiler 2024", COMPILER EXE NAME = icx.exe
- TOOLSET = "Intel C++ Compiler 2023", COMPILER EXE NAME = icx.exe
- TOOLSET = "Intel C++ Compiler 2022", COMPILER EXE NAME = icx.exe
Expand All @@ -456,9 +457,25 @@ Once installed first one or both, check some files.
CMake integration and support files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. For Intel C++ Compiler 2024:
1. For Intel C++ Compiler 2025:

Info from: c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\lib\cmake\IntelDPCPP\ReadMeDPCPP.txt
Info from: c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\lib\\cmake\\IntelDPCPP\\ReadMeDPCPP.txt

Copy

c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\lib\\cmake\\IntelDPCPP\\IntelDPCPPConfig.cmake

and

c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\lib\\cmake\\IntelDPCPP\\IntelDPCPPConfigVersion.cmake

to

c:\\Program Files\\CMake\\share\\cmake-3.25\\Modules\\IntelDPCPP\\

2. For Intel C++ Compiler 2024:

Info from: c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\lib\\cmake\\IntelDPCPP\\ReadMeDPCPP.txt

Copy

Expand All @@ -473,7 +490,7 @@ CMake integration and support files
c:\\Program Files\\CMake\\share\\cmake-3.25\\Modules\\


2. For Intel C++ Compiler 2023:
3. For Intel C++ Compiler 2023:

Info from: c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\IntelDPCPP\\ReadMe.txt

Expand All @@ -486,7 +503,7 @@ CMake integration and support files
c:\\Program Files\\CMake\\share\\cmake-3.25\\Modules\\


3. For Intel C++ Compiler 2021:
4. For Intel C++ Compiler 2021:

Info from: c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\cmake\\SYCL\\

Expand All @@ -498,7 +515,7 @@ CMake integration and support files

c:\\Program Files\\CMake\\share\\cmake-3.20\\Modules\\

Note: Intel C++ Compilers need Cmake 3.22.3 (Windows) or 3.22.1 (Linux) as a minimum (as of Intel 2024)
Note: Intel C++ Compilers need Cmake 3.22.3 (Windows) or 3.22.1 (Linux) as a minimum (as of Intel 2024 or 2025)


From CMake GUI:
Expand All @@ -517,6 +534,7 @@ From CMake GUI:

- For LLVM based icx:

- `Intel C++ Compiler 2025` or
- `Intel C++ Compiler 2024` or
- `Intel C++ Compiler 2023` or
- `Intel C++ Compiler 2022` or
Expand All @@ -528,8 +546,14 @@ From CMake GUI:

7. Specify native compilers (checkbox): browse for the appropriate compiler executable path.

- icx: C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\icx.exe
- icl: C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\intel64\\icl.exe
- Intel C++ Compiler 2025:

- icx: c:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\bin\\icx.exe

- Intel C++ Compiler 2024:

- icx: C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\icx.exe
- icl: C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\intel64\\icl.exe

If you have errors like ``xilink: : error : Assertion failed (shared/driver/drvutils.c, line 312`` then
as a workaround you must copy clang.exe (by default it is located in C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin)
Expand All @@ -539,6 +563,13 @@ Successful log looks like:

(Note: If CXX compiler is not the Intel one, then you probably missed step #7.)

::

The CXX compiler identification is IntelLLVM 2025.0.0 with MSVC-like command-line
Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/2025.0/bin/icx.exe

or

::

The CXX compiler identification is IntelLLVM 2023.0.0 with MSVC-like command-line
Expand Down Expand Up @@ -595,7 +626,7 @@ Examples (assuming we are in ``avisynth-build`` folder). Config can be Debug, Re
@rem cd avisynth-build
del .\CMakeCache.txt
C:\Program Files (x86)\Intel\oneAPI\setvars.bat
cmake ../ -T "Intel C++ Compiler 2024" -DCMAKE_CXX_COMPILER="icx.exe" -DBUILD_DIRECTSHOWSOURCE:bool=off -DENABLE_PLUGINS:bool=on -DENABLE_INTEL_SIMD:bool=ON
cmake ../ -T "Intel C++ Compiler 2025" -DCMAKE_CXX_COMPILER="icx.exe" -DBUILD_DIRECTSHOWSOURCE:bool=off -DENABLE_PLUGINS:bool=on -DENABLE_INTEL_SIMD:bool=ON
cmake --build . --config Debug --clean-first

``x_icx_cleanfirst_no_simd.bat``
Expand All @@ -606,7 +637,7 @@ This one will build only Avisynth.dll, no external plugins, plain C code (no SIM
@rem cd avisynth-build
del .\CMakeCache.txt
C:\Program Files (x86)\Intel\oneAPI\setvars.bat
cmake ../ -T "Intel C++ Compiler 2024" -DCMAKE_CXX_COMPILER="icx.exe" -DBUILD_DIRECTSHOWSOURCE:bool=off -DENABLE_PLUGINS:bool=OFF -DENABLE_INTEL_SIMD:bool=OFF
cmake ../ -T "Intel C++ Compiler 2025" -DCMAKE_CXX_COMPILER="icx.exe" -DBUILD_DIRECTSHOWSOURCE:bool=off -DENABLE_PLUGINS:bool=OFF -DENABLE_INTEL_SIMD:bool=OFF
cmake --build . --config Debug --clean-first


Expand Down

0 comments on commit 374a82f

Please sign in to comment.