[CMake] FIND_PACKAGE(OpenMP) and distcc, cmake 2.8.0
Hicham Mouline
hicham at mouline.org
Thu Jun 10 06:49:09 EDT 2010
Hello,
My cmake system is configured to use distcc, as shown here:
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/local/bin/distcc
-- Check for working C compiler: /usr/local/bin/distcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/distcc
-- Check for working CXX compiler: /usr/local/bin/distcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
The version of all compilers is g++ 4.3.3
At some stage I call:
FIND_PACKAGE(OpenMP)
This outputs:
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Could NOT find OpenMP (missing: OpenMP_C_FLAGS)
Strangely, the C flag (which is the same as the C++ flag) doesn't pass, while the C++ one succeeds.
and OPENMP_FOUND is set to false
The env variables are:
DISTCC_HOSTS=--localslots=3 localhost/1 otherbox/15
CC=distcc gcc43
CXX=distcc g++43
Is there some tuning to do to the FindOpenMp package?
rds,
More information about the CMake
mailing list