Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,823
    • Issues 3,823
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #17251
Closed
Open
Created Sep 01, 2017 by Henry Schreiner@henryiiiContributor

Regression: OpenMP_FOUND broken in 3.9

On macOS with brew install llvm and llvm environment set up, 3.9 has stopped reporting OpenMP found with OpenMP_FOUND even on a CXX only project (but it still finds OpenMP and correctly sets the new OpenMP_CXX_FOUND flag).

Example CMakeLists.txt:

cmake_minimum_required(VERSION 3.8)

project(EXAMPLE LANGUAGES CXX)

find_package(OpenMP)

message(STATUS "Overall: ${OpenMP_FOUND}")
message(STATUS "CXX: ${OpenMP_CXX_FOUND}")

Output:

-- The CXX compiler identification is Clang 4.0.1
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_CXX: -fopenmp=libomp (found version "3.1")
-- Overall:
-- CXX: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/tmp

Exactly the same, just with CMake 3.8.2:

-- The CXX compiler identification is Clang 4.0.1
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Try OpenMP CXX flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp=libomp
-- Overall: TRUE
-- CXX:
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/tmp
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking