Intel 2022.1 ifx compiler not recognized under windows 10

Hi,

Using cmake 3.22.2 or later and ninja 1.11.0 with Intel oneAPI 2022.1 we get with the following CMakeList.txt:

cmake_minimum_required(VERSION 3.22.2)

set ( CMAKE_C_COMPILER “C:/Program Files (x86)/Intel/oneAPI/compiler/2022.1.0/windows/bin/icx.exe” )
set ( CMAKE_CXX_COMPILER “C:/Program Files (x86)/Intel/oneAPI/compiler/2022.1.0/windows/bin/icx.exe” )
set ( CMAKE_Fortran_COMPILER “C:/Program Files (x86)/Intel/oneAPI/compiler/2022.1.0/windows/bin/ifx.exe” )

set the project name

project(Tutorial C CXX Fortran)

The following output on Windows:

– The C compiler identification is IntelLLVM 2022.1.0 with MSVC-like command-line
– The CXX compiler identification is IntelLLVM 2022.1.0 with MSVC-like command-line
– The Fortran compiler identification is unknown
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2022.1.0 Build 20220316
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/2022.1.0/windows/bin/icx.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/2022.1.0/windows/bin/icx.exe - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Detecting Fortran compiler ABI info
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_Fortran_PREPROCESS_SOURCE
CMake Error at D:/p4ws/repo_cache/software/kitware/cmake/cmake-3.23.2-windows-x86_64/share/cmake-3.23/Modules/CMakeDetermineCompilerABI.cmake:49 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
D:/p4ws/repo_cache/software/kitware/cmake/cmake-3.23.2-windows-x86_64/share/cmake-3.23/Modules/CMakeTestFortranCompiler.cmake:20 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:8 (project)

– Configuring incomplete, errors occurred!
See also “E:/tmp/build/CMakeFiles/CMakeOutput.log”.
See also “E:/tmp/build/CMakeFiles/CMakeError.log”.

Any suggestions what to do?
On Linux it works!

Best regards
Frank

CMakeOutputLog.txt:
Determining if the Fortran compiler is GNU failed with the following output:

1 “D:/p4ws/repo_cache/software/kitware/cmake/cmake-3.23.2-windows-x86_64/share/cmake-3.23/Modules\CMakeTestGNU.c”

4

7

10

The output was:
1
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2022.1.0 Build 20220316
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

CMakeFortranCompilerId.F: fatal: can’t fopen file: C:/Users/f.i

It seems that the intel ifx has the problem when one tries to compile by
ifx -fpp source.f
then output is
source.F: fatal: can’t fopen file: C:/Users/f.i
I’ll post that in the intel forum…

Please close this thread because it has nothing to do with cmake.
Its the problem of intel ifx when TMP variable points to path with dots e.g. /c/f.roeser/tmp.
There is an entry in the intel forum.

Frank