Skip to content

Commit

Permalink
Test with -g flag, strict=1, mem_ptr=0
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelfj committed Mar 12, 2024
1 parent e31b365 commit 7ec940f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel")
# This does not apply to Intel ICX compiler.
message(STATUS "Setting Intel C (ICC) compiler options")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall -Wextra")
# add debug flag for testing
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")

# warning #169: expected a declaration
# Fallthrough attribute does not like semicolon.
Expand All @@ -297,11 +299,11 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel")

# = 1: Force pointer cast memory access
# (only effective when STRICT=1)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPORTABLE_MEM_PTR_ACCESS=0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPORTABLE_MEM_PTR_ACCESS=0")

# = 1 : DebugMake sure we know which branch of pmemaccess.h we use, this will fail build.
# (only effective when STRICT=1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPORTABLE_MEM_ACCESS_DEBUG=1")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPORTABLE_MEM_ACCESS_DEBUG=0")

elseif (MSVC) # using STREQUAL here conflicts with string interpretation changes in CMake
message(STATUS "Setting MSVC C compiler options")
Expand Down

0 comments on commit 7ec940f

Please sign in to comment.