[Bug 223678] devel/cmake: find_package(OpenMP) doesn't find the openmp package (when base clang compiler is used)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 1 19:37:35 BST 2023


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678

--- Comment #31 from Adriaan de Groot <adridg at freebsd.org> ---
Create a sample project that needs OpenMP:

[adridg at beastie /tmp/openmp]$ cat > CMakeLists.txt
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(derp VERSION 1.0 LANGUAGES C CXX)
find_package(OpenMP)

Generate it:

[adridg at beastie /tmp/openmp]$ cmake -S . -B build
-- The C compiler identification is Clang 14.0.5
-- The CXX compiler identification is Clang 14.0.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP: TRUE (found version "5.0")  
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/openmp/build

If there's issues, file a new PR with a minimal reproducible example.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list