I encountered problems with the OpenMP detection routine from the CMakeLists.
I had problem with the Intel Compiler on linux, and now I have the same problem when compiling on MacOSX 10.8 with the default compiler (clang).
CMake provides the necessary find_package for OpenMP, and it solves the issue.
More specifically, replacing line 273 to 306 of CMakeLists.txt with much simpler :
# check for OpenMP
find_package(OpenMP)
if(OPENMP_FOUND)
message(STATUS "Enabling OpenMP support")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
else()
message(STATUS "Disabling OpenMP support")
endif()
does the trick.
Compilation goes on for MacOSX 10.8/clang (no openmp found).
Also tested on linux, where openmp is activated correctly.
Did not yet try with Intel Compiler though.
Seems safer to me as it tests more flags than current libsiftfast, and also actually runs a try_compile with OpenMP code to validate.
No idea about the "gomp" library that is linked in the libsiftfast CMakeLists, and does not come out of the FindOpenMP.cmake file.
Looking at http://gcc.gnu.org/onlinedocs/libgomp/Enabling-OpenMP.html#Enabling-OpenMP
it seems that the compiler flag is enough and triggers automatic linking to OpenMP lib on gcc.
Pushed in orfeotoolbox :
http://hg.orfeo-toolbox.org/OTB/rev/fe36dd87cf32
which integrates the current libsiftfast code