[Bug 219862] devel/cmake: Cmake 3.8.0 somehow is unaware about CXX17 dialect

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jun 10 12:15:27 UTC 2017


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

--- Comment #4 from groot at kde.org ---
Created attachment 183379
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=183379&action=edit
Test for C++17 detection

Here's a simple C++17 program, a CMakeLists.txt that demands C++17, and a
Makefile that tries building the program with base-c++ and clang++3* and
clang++40 (what succeeds depends on what is installed on your system).

On FreeBSD 11.0, base-c++ gives me thie same output as the OP:


### /usr/bin/c++
###
###
/usr/bin/c++ --version
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM
3.8.0)
Target: x86_64-unknown-freebsd11.0
Thread model: posix
InstalledDir: /usr/bin
( cd mbuild/build-base && cmake ../.. && make && ./example )
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error in CMakeLists.txt:
  Target "example" requires the language dialect "CXX17" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.


While on FreeBSD 10.3, the same compiler (roughly .. ports is different from
11.0's base) does work:
### /usr/local/bin/clang++38
###
###
/usr/local/bin/clang++38 --version
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-unknown-freebsd10.3
Thread model: posix
InstalledDir: /usr/local/llvm38/bin
( cd mbuild/build-38 && cmake ../.. && make && ./example )
-- The C compiler identification is Clang 3.8.1
-- The CXX compiler identification is Clang 3.8.1
-- Check for working C compiler: /usr/local/bin/clang38
-- Check for working C compiler: /usr/local/bin/clang38 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/bin/clang++38
-- Check for working CXX compiler: /usr/local/bin/clang++38 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done

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


More information about the kde-freebsd mailing list