But there are ifdefs everywhere which will still compile-in openmp calls.
This is my remaining bug for 32bit Centos6, where OpenMP is either broken or cmake can't find it properly:
35781 -- Could NOT find OpenMP_C (missing: OpenMP_pthread_LIBRARY) (found version "3.1")
35782 -- Could NOT find OpenMP_CXX (missing: OpenMP_pthread_LIBRARY) (found version "3.1")
35783 -- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
35784 CMake Warning at CMakeLists.txt:104 (message):
35785 OpenMP NOT found
36035 [ 94%] Building CXX object CMakeFiles/mincbeast.dir/mincbeast.o
36036 [100%] Linking CXX executable mincbeast
36037 CMakeFiles/mincbeast.dir/mincbeast.o: In function `main':
36038 mincbeast.cpp:(.text.startup+0x30): undefined reference to `omp_get_max_threads'
36039 libbeast.a(beast_lib.o): In function `median_filter(float*, int*, int)':
36040 beast_lib.cpp:(.text+0x126): undefined reference to `omp_get_max_threads'
36041 beast_lib.cpp:(.text+0x141): undefined reference to `omp_get_max_threads'
36042 beast_lib.cpp:(.text+0x1b2): undefined reference to `omp_get_thread_num'
36043 beast_lib.cpp:(.text+0x409): undefined reference to `omp_get_max_threads'
36044 libbeast.a(nlmsegFuzzy.o): In function `nlmsegFuzzy4D(float const*, float const*, float const*, float const*, float const*, float const*, int, int, float, float, int const*, int, float*, float*)':
36045 nlmsegFuzzy.cpp:(.text+0x14): undefined reference to `omp_get_max_threads'
36046 nlmsegFuzzy.cpp:(.text+0x2b): undefined reference to `omp_get_max_threads'
36047 nlmsegFuzzy.cpp:(.text+0x42): undefined reference to `omp_get_max_threads'
36048 nlmsegFuzzy.cpp:(.text+0x13d): undefined reference to `omp_get_max_threads'
36049 libbeast.a(nlmsegFuzzy.o):nlmsegFuzzy.cpp:(.text+0x362): more undefined references to `omp_get_max_threads' follow
36050 libbeast.a(nlmsegFuzzy.o): In function `nlmsegFuzzy4D(float const*, float const*, float const*, float const*, float const*, float const*, int, int, float, float, int const*, int, float*, float*)':
36051 nlmsegFuzzy.cpp:(.text+0x3b3): undefined reference to `omp_get_thread_num'
36052 nlmsegFuzzy.cpp:(.text+0x3bf): undefined reference to `omp_get_num_threads'
36053 nlmsegFuzzy.cpp:(.text+0x3ec): undefined reference to `omp_get_thread_num'
36054 nlmsegFuzzy.cpp:(.text+0x3ff): undefined reference to `omp_get_thread_num'
36055 nlmsegFuzzy.cpp:(.text+0x412): undefined reference to `omp_get_thread_num'
36056 nlmsegFuzzy.cpp:(.text+0xb9b): undefined reference to `omp_get_max_threads'
36057 nlmsegFuzzy.cpp:(.text+0xc8b): undefined reference to `omp_get_max_threads'
36058 libbeast.a(nlmsegFuzzy.o): In function `nlmsegFuzzy4D_double(float const*, float const*, float const*, float const*, float const*, float const*, int, int, double, double, int const*, int, float*, float*)':
36059 nlmsegFuzzy.cpp:(.text+0xd8d): undefined reference to `omp_get_max_threads'
36060 nlmsegFuzzy.cpp:(.text+0xda4): undefined reference to `omp_get_max_threads'
36061 nlmsegFuzzy.cpp:(.text+0xdbb): undefined reference to `omp_get_max_threads'
36062 libbeast.a(nlmsegFuzzy.o):nlmsegFuzzy.cpp:(.text+0xeb3): more undefined references to `omp_get_max_threads' follow
36063 libbeast.a(nlmsegFuzzy.o): In function `nlmsegFuzzy4D_double(float const*, float const*, float const*, float const*, float const*, float const*, int, int, double, double, int const*, int, float*, float*)':
36064 nlmsegFuzzy.cpp:(.text+0x1129): undefined reference to `omp_get_thread_num'
36065 nlmsegFuzzy.cpp:(.text+0x1135): undefined reference to `omp_get_num_threads'
36066 nlmsegFuzzy.cpp:(.text+0x1162): undefined reference to `omp_get_thread_num'
36067 nlmsegFuzzy.cpp:(.text+0x1178): undefined reference to `omp_get_thread_num'
36068 nlmsegFuzzy.cpp:(.text+0x118b): undefined reference to `omp_get_thread_num'
36069 nlmsegFuzzy.cpp:(.text+0x1927): undefined reference to `omp_get_max_threads'
36070 nlmsegFuzzy.cpp:(.text+0x1a14): undefined reference to `omp_get_max_threads'
36071 collect2: error: ld returned 1 exit status