Skip to content
Snippets Groups Projects
Commit 01d0d513 authored by Christian Engwer's avatar Christian Engwer Committed by Jö Fahlke
Browse files

[cmake] simplify Vc handling and add HAVE_VC to config.h

parent 19a279f8
No related branches found
No related tags found
No related merge requests found
# Defines the functions to use GMP
#
# .. cmake_function:: add_dune_vc_flags
#
# .. cmake_param:: targets
# :positional:
# :single:
# :required:
#
# A list of targets to use GMP with.
#
function(add_dune_vc_flags _targets)
if(Vc_FOUND)
foreach(_target ${_targets})
target_link_libraries(${_target} ${Vc_LIBRARIES})
target_compile_options(${_target} ${Vc_ALL_FLAGS})
target_include_directories(${_target} SYSTEM ${Vc_INCLUDE_DIR})
endforeach(_target ${_targets})
endif(Vc_FOUND)
endfunction(add_dune_vc_flags)
......@@ -26,5 +26,12 @@ include(AddGMPFlags)
find_package(Inkscape)
include(UseInkscape)
include(FindMProtect)
# try to find the Vc library
find_package(Vc)
include(AddVcFlags)
set(HAVE_VC ${Vc_FOUND})
if(${HAVE_VC})
dune_register_package_flags(COMPILE_OPTIONS "${Vc_ALL_FLAGS}"
LIBRARIES "${Vc_LIBRARIES}"
INCLUDE_DIRS "${Vc_INCLUDE_DIR}")
endif(${HAVE_VC})
......@@ -45,6 +45,9 @@
to facilitate activating and deactivating GMP using compile flags. */
#cmakedefine HAVE_GMP ENABLE_GMP
/* Define to 1 if you have the Vc library. */
#cmakedefine HAVE_VC 1
/* Define to 1 if you have the symbol mprotect. */
#cmakedefine HAVE_MPROTECT 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment