Skip to content

Commit

Permalink
Properly add the compile definitions coming from ROOT.
Browse files Browse the repository at this point in the history
That will help us when creating C libraries.
  • Loading branch information
vgvassilev committed Dec 3, 2020
1 parent a07ad27 commit 00b7fc1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ include(PytestBenchmark)

#---Add ROOT include direcories and used compilation flags
include_directories(${ROOT_INCLUDE_DIRS})
add_definitions(${ROOT_CXX_FLAGS})
string(REPLACE " " ";" ROOT_C_FLAGS_LIST ${ROOT_C_FLAGS})
string(REPLACE " " ";" ROOT_CXX_FLAGS_LIST ${ROOT_CXX_FLAGS})
foreach(C_COMPILE_FLAG ${ROOT_C_FLAGS_LIST})
add_compile_options($<$<COMPILE_LANGUAGE:C>:${C_COMPILE_FLAG}>)
endforeach()
foreach(CXX_COMPILE_FLAG ${ROOT_CXX_FLAGS_LIST})
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${CXX_COMPILE_FLAG}>)
endforeach()

#---Include rootbench options
include(RootBenchOptions)
Expand Down

0 comments on commit 00b7fc1

Please sign in to comment.