From 9b3e531ac5d6ad5e817d96044393fa0ccd8049a5 Mon Sep 17 00:00:00 2001 From: piyushrpt Date: Sat, 18 Jul 2020 14:42:58 -0700 Subject: [PATCH] Adding openmp to missing modules --- components/stdproc/stdproc/CMakeLists.txt | 5 +++++ components/stdproc/stdproc/correct/CMakeLists.txt | 6 +++++- components/stdproc/stdproc/crossmul/CMakeLists.txt | 6 +++++- components/stdproc/stdproc/mocompTSX/CMakeLists.txt | 6 +++++- components/stdproc/stdproc/offsetpoly/CMakeLists.txt | 6 +++++- components/stdproc/stdproc/resamp/CMakeLists.txt | 6 +++++- components/stdproc/stdproc/topo/CMakeLists.txt | 5 +++++ 7 files changed, 35 insertions(+), 5 deletions(-) diff --git a/components/stdproc/stdproc/CMakeLists.txt b/components/stdproc/stdproc/CMakeLists.txt index 42795b9..ff94ecf 100644 --- a/components/stdproc/stdproc/CMakeLists.txt +++ b/components/stdproc/stdproc/CMakeLists.txt @@ -11,6 +11,11 @@ set_property(TARGET formslcLib PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries(formslcLib PUBLIC utilLib ) +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(formslcLib PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() set(mdir ${CMAKE_CURRENT_BINARY_DIR}/formslc_fortran_modules) set_property(TARGET formslcLib PROPERTY Fortran_MODULE_DIRECTORY ${mdir}) diff --git a/components/stdproc/stdproc/correct/CMakeLists.txt b/components/stdproc/stdproc/correct/CMakeLists.txt index a237f5c..6e6779b 100644 --- a/components/stdproc/stdproc/correct/CMakeLists.txt +++ b/components/stdproc/stdproc/correct/CMakeLists.txt @@ -5,7 +5,11 @@ Python_add_library(correct MODULE src/correctState.f ) target_include_directories(correct PUBLIC include) - +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(correct PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() InstallSameDir( correct __init__.py diff --git a/components/stdproc/stdproc/crossmul/CMakeLists.txt b/components/stdproc/stdproc/crossmul/CMakeLists.txt index 094f295..8f69a26 100644 --- a/components/stdproc/stdproc/crossmul/CMakeLists.txt +++ b/components/stdproc/stdproc/crossmul/CMakeLists.txt @@ -4,7 +4,11 @@ Python_add_library(crossmul MODULE src/crossmul.f90 ) target_include_directories(crossmul PUBLIC include) - +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(crossmul PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() InstallSameDir( crossmul __init__.py diff --git a/components/stdproc/stdproc/mocompTSX/CMakeLists.txt b/components/stdproc/stdproc/mocompTSX/CMakeLists.txt index 02118e8..d887cf0 100644 --- a/components/stdproc/stdproc/mocompTSX/CMakeLists.txt +++ b/components/stdproc/stdproc/mocompTSX/CMakeLists.txt @@ -12,7 +12,11 @@ target_link_libraries(mocompTSX formslcLib utilLib ) - +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(mocompTSX PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() InstallSameDir( mocompTSX __init__.py diff --git a/components/stdproc/stdproc/offsetpoly/CMakeLists.txt b/components/stdproc/stdproc/offsetpoly/CMakeLists.txt index 0124945..3e6a0af 100644 --- a/components/stdproc/stdproc/offsetpoly/CMakeLists.txt +++ b/components/stdproc/stdproc/offsetpoly/CMakeLists.txt @@ -11,7 +11,11 @@ target_link_libraries(offsetpoly PUBLIC combinedLib utilLib ) - +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(offsetpoly PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() InstallSameDir( offsetpoly __init__.py diff --git a/components/stdproc/stdproc/resamp/CMakeLists.txt b/components/stdproc/stdproc/resamp/CMakeLists.txt index 62df9b0..af22079 100644 --- a/components/stdproc/stdproc/resamp/CMakeLists.txt +++ b/components/stdproc/stdproc/resamp/CMakeLists.txt @@ -10,7 +10,11 @@ target_include_directories(resamp PUBLIC include) target_link_libraries(resamp PUBLIC utilLib ) - +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(resamp PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() InstallSameDir( resamp __init__.py diff --git a/components/stdproc/stdproc/topo/CMakeLists.txt b/components/stdproc/stdproc/topo/CMakeLists.txt index 450066e..5533a8f 100644 --- a/components/stdproc/stdproc/topo/CMakeLists.txt +++ b/components/stdproc/stdproc/topo/CMakeLists.txt @@ -11,6 +11,11 @@ target_link_libraries(topo PUBLIC combinedLib utilLib ) +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(topo PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() InstallSameDir( topo