diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-08-29 16:32:54 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-08-29 18:20:02 +0200 |
commit | 4f29e54f1c61c67340b83b78092ae8a11942629e (patch) | |
tree | e4a33b20c392f188f71b1485cd9d75ebe8762d09 | |
parent | 2bfc8db4f52395a57d7de9d241db254adc8924bc (diff) | |
download | libkdcraw-4f29e54f1c61c67340b83b78092ae8a11942629e.tar.gz libkdcraw-4f29e54f1c61c67340b83b78092ae8a11942629e.zip |
Remove #pragma omp from definition of structure in the header file.
Use #pragma omp relates to code blocks, which is usually not the case
of the header files. Therefore, use in the definition of structure
seems incorrect and may cause FTBFS with some OpenMP implementations.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 05c71a837285074c711e3aaff5e2ca878ee1b862)
-rw-r--r-- | ConfigureChecks.cmake | 14 | ||||
-rw-r--r-- | libkdcraw/libraw/libraw/libraw_types.h | 12 |
2 files changed, 5 insertions, 21 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index d595f93..1864512 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -48,16 +48,12 @@ endif( WITH_LCMS ) ##### check for OpenMP if( WITH_OPENMP ) - if( CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) - find_package( OpenMP ) - if( OPENMP_FOUND ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" ) - else() - tde_message_fatal( "OpenMP is requested, but was not found on your system" ) - endif() + find_package( OpenMP ) + if( OPENMP_FOUND ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" ) else() - tde_message_fatal( "OpenMP build is available for the GNU GCC compiler only" ) + tde_message_fatal( "OpenMP is requested, but was not found on your system" ) endif() endif( WITH_OPENMP ) diff --git a/libkdcraw/libraw/libraw/libraw_types.h b/libkdcraw/libraw/libraw/libraw_types.h index 2a9e1bc..00e3f26 100644 --- a/libkdcraw/libraw/libraw/libraw_types.h +++ b/libkdcraw/libraw/libraw/libraw_types.h @@ -104,9 +104,6 @@ typedef struct colors, bits, gamma_corrected; -#ifdef _OPENMP -#pragma omp firstprivate(colors,height,width) -#endif unsigned int data_size; // ðàçìåð ïîëÿ äàííûõ â áàéòàõ unsigned char data[1]; // we'll allocate more! }libraw_processed_image_t; @@ -138,9 +135,6 @@ typedef struct left_margin; ushort iheight, iwidth; -#ifdef _OPENMP -#pragma omp firstprivate(iheight,iwidth) -#endif double pixel_aspect; int flip; @@ -225,9 +219,6 @@ typedef struct unsigned shot_select; /* -s */ float bright; /* -b */ float threshold; /* -n */ -#ifdef _OPENMP -#pragma omp firstprivate(threshold) -#endif int half_size; /* -h */ int four_color_rgb; /* -f */ int document_mode; /* -d/-D */ @@ -281,9 +272,6 @@ typedef struct libraw_thumbnail_t thumbnail; libraw_masked_t masked_pixels; ushort (*image)[4] ; -#ifdef _OPENMP -#pragma omp shared(image) -#endif libraw_output_params_t params; // pointer to LibRaw class for use in C calls void *parent_class; |