forked from OpenSees/OpenSees
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathintel23-ifx-static-msvc.cmake
More file actions
25 lines (19 loc) · 958 Bytes
/
intel23-ifx-static-msvc.cmake
File metadata and controls
25 lines (19 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ------------------------------------------------------------
# Intel oneAPI ifx + MSVC + static runtime toolchain
# ------------------------------------------------------------
# We are targeting Windows
set(CMAKE_SYSTEM_NAME Windows)
# --- COMPILERS ---
# IMPORTANT: use FULL PATHS
set(CMAKE_Fortran_COMPILER "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/ifx.exe" CACHE FILEPATH "")
set(CMAKE_C_COMPILER "cl.exe" CACHE STRING "")
set(CMAKE_CXX_COMPILER "cl.exe" CACHE STRING "")
# --- MSVC RUNTIME: STATIC ---
# This is the key line to avoid multithreaded DLLs
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "")
# --- FORTRAN FLAGS ---
# Ensure static runtime for ifx
set(CMAKE_Fortran_FLAGS_INIT "/libs:static" CACHE STRING "")
# --- OPTIONAL: avoid auto-switching generators ---
set(CMAKE_GENERATOR_TOOLSET "" CACHE STRING "")
# ------------------------------------------------------------