Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: figure out how to handle openmp #37

Open
fnrizzi opened this issue Sep 14, 2022 · 1 comment
Open

build: figure out how to handle openmp #37

fnrizzi opened this issue Sep 14, 2022 · 1 comment

Comments

@fnrizzi
Copy link
Member

fnrizzi commented Sep 14, 2022

No description provided.

@fnrizzi
Copy link
Member Author

fnrizzi commented Sep 14, 2022

for example, use it by default if found:

find_package(OpenMP)

set(exename pdaWfExe)
add_executable(${exename} ${CMAKE_CURRENT_SOURCE_DIR}/cpp/main.cc)
target_compile_options(${exename} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-march=native>)
if(NOT OpenMP_CXX_FOUND)
  target_link_libraries(${exename} PRIVATE yaml-cpp)
else()
  target_link_libraries(${exename} PRIVATE yaml-cpp OpenMP::OpenMP_CXX)
  target_compile_definitions(${exename} PRIVATE PRESSIODEMOAPPS_ENABLE_OPENMP)
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant