Skip to content

Commit

Permalink
Update main CMakeLists.txt to set 'C' compiler options.
Browse files Browse the repository at this point in the history
  • Loading branch information
George Gayno committed Aug 20, 2024
1 parent 97d8e44 commit 1056ef5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb -Wall -fcheck=all")
endif()

if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$")
if(CMAKE_C_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -traceback")
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-O0")
if(CMAKE_C_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_C_FLAGS_RELEASE "-O2")
else()
set(CMAKE_C_FLAGS_RELEASE "-O1")
endif()
endif()

# Find packages.
Expand Down

0 comments on commit 1056ef5

Please sign in to comment.