From dc25116ac34a0456015de61fa20916153c593776 Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Mon, 18 Nov 2024 18:58:27 -0500 Subject: [PATCH] Update CMakeLists.txt to add OpenMP to Windows --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de089093..dc186556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,7 @@ elseif(WIN32 AND MSVC) /GL # Enable whole program optimization /Zi # Generate debugging information in PDB files /MT # Use static runtime libraries + /openmp:experimental # Add support for OpenMP ) add_link_options( /OPT:REF # Remove unreferenced functions/data @@ -107,11 +108,12 @@ elseif(WIN32 AND MSVC) # # macOS-specific settings # -elseif(APPLE) +elseif(APPLE) add_compile_options( -O3 # Optimize for speed -Wall # Enable most warning messages -Wextra # Enable additional warning messages + -fopenmp-simd # Add support for OpenMP ) add_link_options( -Wl,-dead_strip # Remove unused code and data during linking @@ -128,6 +130,7 @@ elseif(UNIX) -O3 # Optimize for speed -Wall # Enable most warning messages -Wextra # Enable additional warning messages + -fopenmp-simd # Add support for OpenMP ) add_link_options( -Wl,--gc-sections # Remove unused sections during linking