-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake build failed - icpx: error: unknown argument: '-MDd' #334
Comments
I deleted the build directory and tried the following cmake command using -G"Visual Studio 17 2022" -A"x64" instead of -G "NMake Makefiles" , but got the error below: IntelSYCL_FOUND to FALSE so package "IntelSYCL" is considered to be NOT FOUND According to the header in IntelSYCLConfig.cmake, IntelSYCL_FOUND = TRUE when "the system has the SYCL library". So obviously I don't have the lib. syclacademy\build> cmake -G"Visual Studio 17 2022" -A"x64" -DSYCL_ACADEMY_USE_DPCPP=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
but it set IntelSYCL_FOUND to FALSE so package "IntelSYCL" is considered to be NOT FOUND. Reason given by package: Unsupported compiler family MSVC and compiler C:/Program Files/Microsoft Visual -- Configuring incomplete, errors occurred! |
I also tried MSVC 2019. Same "IntelSYCL_FOUND to FALSE" error build> cmake -G"Visual Studio 16 2019" -A"x64" -DSYCL_ACADEMY_USE_DPCPP=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
but it set IntelSYCL_FOUND to FALSE so package "IntelSYCL" is considered to Unsupported compiler family MSVC and compiler C:/Program Files |
Hi @SailingDreams, I believe if you try to set the compiler as |
Thanks for getting back to me. The output is below -- The C compiler identification is IntelLLVM 2024.0.2 with MSVC-like command-line |
Bilding the project was successful. I used nmake build> nmake Microsoft (R) Program Maintenance Utility Version 14.37.32824.0 [ 2%] Building CXX object Code_Exercises/Exercise_01_Compiling_with_SYCL/CMakeFiles/exercise_1_source.dir/source.cpp.obj |
Great, I'm glad it's working! |
2024 oneAPI
Windows 10
vscode terminal
I followed the readme.md instructions to install Installing DPC++ ("To set up DPC++ follow the getting started instructions.") and was able to build the simple-add example in https://github.com/oneapi-src/oneAPI-samples. But when I try to use the same steps to cmake build syclacademy, I get the following cmake error (the attached file has the cmake output when using cmake --trace).
The command I used to setup my environment in powershell is
cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\setvars.bat" && powershell'
I am using the generator option -G "NMake Makefiles" as per the readme in oneAPI-samples repo's simple-add example.
CmakeTraceOutput.txt
**************Powershell output (without --trace) ************************
PS C:\git\oneAPI\syclacademy\build> cmake -G "NMake Makefiles" -DSYCL_ACADEMY_USE_DPCPP=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
-- The CXX compiler identification is IntelLLVM 2024.0.2 with GNU-like command-line
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icpx.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icpx.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icpx.exe
is not able to compile a simple test program.
It fails with the following output:
9.dir\build.make /nologo -L CMakeFiles\cmTC_41f69.dir\build' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)
-- Configuring incomplete, errors occurred!
The text was updated successfully, but these errors were encountered: