Skip to content

Commit

Permalink
Merge pull request #513 from jmellorcrummey/fix-openmp-link
Browse files Browse the repository at this point in the history
as needed, add -fopenmp flag when linking executables
  • Loading branch information
mxz297 committed Dec 7, 2018
2 parents 70f4a29 + 6f96036 commit 20909b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/CMakeLists.txt
Expand Up @@ -21,6 +21,13 @@ add_dependencies(cfg_to_dot parseAPI symtabAPI instructionAPI common dynDwarf dy
target_link_libraries(cfg_to_dot parseAPI symtabAPI instructionAPI common dynDwarf dynElf ${Boost_LIBRARIES})
#add_executable(retee)

if (USE_OpenMP MATCHES "ON")
set_target_properties (unstrip PROPERTIES LINK_FLAGS "-fopenmp")
set_target_properties (codeCoverage PROPERTIES LINK_FLAGS "-fopenmp")
set_target_properties (cfg_to_dot PROPERTIES LINK_FLAGS "-fopenmp")
endif()


install (TARGETS cfg_to_dot unstrip codeCoverage Inst
RUNTIME DESTINATION ${INSTALL_BIN_DIR}
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
Expand Down
5 changes: 5 additions & 0 deletions parseThat/CMakeLists.txt
@@ -1,4 +1,9 @@
add_executable(parseThat src/parseThat.C src/config.C src/ipc.C src/record.C src/strlist.C src/reglist.C src/log.C src/utils.C src/sha1.C src/dyninstCore.C src/dyninstCompat.v5.C)
add_definitions(-DHAVE_BPATCH_PROCESS_H)

if (USE_OpenMP MATCHES "ON")
set_target_properties (parseThat PROPERTIES LINK_FLAGS "-fopenmp")
endif()

target_link_private_libraries(parseThat dyninstAPI patchAPI parseAPI instructionAPI stackwalk symtabAPI common pcontrol dynDwarf dynElf ${Boost_LIBRARIES})
install(TARGETS parseThat RUNTIME DESTINATION bin)

0 comments on commit 20909b9

Please sign in to comment.