Repository navigation
WindowsOneAPIBuild
Fabian Wein edited this page Dec 18, 2022
·
15 revisions
This is a brief guiedeline to build Windows on command line using Intel oneAPI
- Install Microsoft Visual Studio Community Edition for C++ with build tools (nmake, cmake, ...). Note that we will use the original cmake
- Install Intel oneAPI C++/Fortran and Math Kernel Library with all dependent packages (the installer will help you) from oneAPI BaseKit and oneAPI HPCKit
- Install git with options for command line
- Install CMake from Kitware
- Install a standard text editor like Notepad++ - one always needs a fast and good editor around :)
- configure git and best is to add shh keys to the gitlab server
- add
C:\Program Files\Git\usr\binto your Path in environment settings. openCFS need patch.exe from there. Make sure by callingpatch --helpon cmd that this worked. Otherwise openCFS will fail building it's cfsdeps. - add
C:\Program Files (x86)\Intel\oneAPIto your Path and always runsetvarsbefore creating a new openCFS build directory with cmake - prepare a
.cfs_platform_defaults.cmakeand place it in your home directory.
- cl - Microsoft Visual Studio C/C++ compiler
- icx, icpx, ifx - Intel oneAPI C, C++ and Fortran compiler based on LLVM
- icc, icpc, ifort - Intel oneAPI classical C, C++ and Fortran compiler - to be replaced by LLVM in future
- clang, clang++ - LLVM compiler distributed by Intel oneAPI
- start cmd and make sure that
nmake,patch --helpandifortare found. Iifortwas not found, you probably forgot to callsetvars - clone cfs e.g. to
code\cfsin your home - create there build directory, e.g.
code\cfs\releaseand go there
We assume to be in a created and empty (!) build directory within the cloned openCFS source. One can either call cmake-gui .. or cmake .. -G "NMake Makefiles. After the initial configuration one can always call cmake-gui . or cmake ., independent on what has been called before. The . can be optionally used instead of .. after the second call.
with cmake-gui you can choose the Generator (use NMake Makefiles) and choose the compilers before configuring openCFS
- when you don't want to use default compilers (MSVC for C/C++ and ifx for Fortran), you need to set them as environment variables like
set CC=ifx,set GCC=ifpx - with
cmake .. -G "NMake Makefiles"you can do an automated configuration based on the settings in.cfs_platform_defaults.cmake. - the settings can be altered via cmake-gui