You are not logged in.

#1 2018-07-18 18:53:41

z3lt
Member
Registered: 2018-07-18
Posts: 5

[SOLVED] CMake add_package problem

Hello,
I am unable to create a cmake project.
To be specific add_package( Threads ) throws an error.


[z3lt-lu@Arch thread]$ cmake ./
CMake Error at /usr/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.11/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeOutput.log".
CMake Error: Unable to open check cache file for write. /home/z3lt/Code/Cpp/thread/CMakeFiles/cmake.check_cache
[z3lt-lu@Arch thread]$ 

this last error can be "fixed" by using sudo, its after effect of doing 'cmake ./' as root(i think)
anyways not a problem


g++ -o app -std=c++17 -pthread main.cpp
Works just fine.
now that i look at CMakeOutput.log it seems like i should use -std=c++1z flag instead of -std=c++17
anyways...

cmake_minimum_required (VERSION 3.0)
project (Threads)

set( CMAKE_C_FLAGS "-Wall -g -std=c++17 -pthread" )
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )

set(THREADS_PREFER_PTHREADS_FLAG ON)
set(CMAKE_THREAD_PREFER_PTHREADS TRUE)

find_package( Threads REQUIRED )
add_executable( thread main.cpp )
#target_link_libraries( thread ${CMAKE_THREAD_LIBS_INIT} )
target_link_libraries( thread Threads::Threads )

I tried quite a few solutions i found online but none of it works (thats why my CMakeLists.txt looks like that) but none of it works.
Any ideas?

Last edited by z3lt (2018-07-19 05:54:22)

Offline

#2 2018-07-18 19:24:02

loqs
Member
Registered: 2014-03-06
Posts: 17,782

Re: [SOLVED] CMake add_package problem

Welcome to the arch linux forums z3lt.  Works for me.  Please use code tags not quote tags for commands and their outputs.

$ cat CMakeLists.txt 
cmake_minimum_required (VERSION 3.0)
project (Threads)

set( CMAKE_C_FLAGS "-Wall -g -std=c++17 -pthread" )
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )

set(THREADS_PREFER_PTHREADS_FLAG ON)
set(CMAKE_THREAD_PREFER_PTHREADS TRUE)

find_package( Threads REQUIRED )
add_executable( thread main.cpp )
#target_link_libraries( thread ${CMAKE_THREAD_LIBS_INIT} )
target_link_libraries( thread Threads::Threads )
$ touch main.cpp
$ cmake ./
-- The C compiler identification is GNU 8.1.1
-- The CXX compiler identification is GNU 8.1.1
-- 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
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/testcmake

Offline

#3 2018-07-18 19:44:51

z3lt
Member
Registered: 2018-07-18
Posts: 5

Re: [SOLVED] CMake add_package problem

Other modules like OpenAL or SDL work just fine.

cmake_minimum_required (VERSION 3.0)
project (Threads)

find_package( OpenAL REQUIRED )
find_package( SDL REQUIRED )
find_package( Threads REQUIRED )

add_executable( thread main.cpp )

produces same error

[z3lt-lu@Arch thread]$ cmake ./
-- Could NOT find Threads (missing: Threads_FOUND) 
CMake Error at /usr/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.11/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:6 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeOutput.log".

btw ty for the welcome

Offline

#4 2018-07-18 19:52:23

loqs
Member
Registered: 2014-03-06
Posts: 17,782

Re: [SOLVED] CMake add_package problem

What is the contents of CMakeFiles/CMakeOutput.log ?

Offline

#5 2018-07-18 20:18:04

z3lt
Member
Registered: 2018-07-18
Posts: 5

Re: [SOLVED] CMake add_package problem

Here it is CMakeOutput.log.

The system is: Linux - 4.17.5-1-ARCH - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/z3lt/Code/Cpp/thread/CMakeFiles/3.11.4/CompilerIdC/a.out"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/bin/c++ 
Build flags: 
Id flags:  

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"

The CXX compiler identification is GNU, found in "/home/z3lt/Code/Cpp/thread/CMakeFiles/3.11.4/CompilerIdCXX/a.out"

Determining if the C compiler works passed with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_8bb1e/fast"
/usr/bin/make -f CMakeFiles/cmTC_8bb1e.dir/build.make CMakeFiles/cmTC_8bb1e.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8bb1e.dir/testCCompiler.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_8bb1e.dir/testCCompiler.c.o   -c /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_8bb1e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8bb1e.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_8bb1e.dir/testCCompiler.c.o  -o cmTC_8bb1e 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


Detecting C compiler ABI info compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_aff3a/fast"
/usr/bin/make -f CMakeFiles/cmTC_aff3a.dir/build.make CMakeFiles/cmTC_aff3a.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o   -c /usr/share/cmake-3.11/Modules/CMakeCCompilerABI.c
Linking C executable cmTC_aff3a
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_aff3a.dir/link.txt --verbose=1
/usr/bin/cc     -v -rdynamic CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o  -o cmTC_aff3a 
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 8.1.1 20180531 (GCC) 
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_aff3a' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccZ8rdba.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_aff3a /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../.. CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crtn.o
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_aff3a' '-mtune=generic' '-march=x86-64'
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command:"/usr/bin/make" "cmTC_aff3a/fast"]
  ignore line: [/usr/bin/make -f CMakeFiles/cmTC_aff3a.dir/build.make CMakeFiles/cmTC_aff3a.dir/build]
  ignore line: [make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp']
  ignore line: [Building C object CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o]
  ignore line: [/usr/bin/cc    -o CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o   -c /usr/share/cmake-3.11/Modules/CMakeCCompilerABI.c]
  ignore line: [Linking C executable cmTC_aff3a]
  ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_aff3a.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/cc     -v -rdynamic CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o  -o cmTC_aff3a ]
  ignore line: [Using built-in specs.]
  ignore line: [COLLECT_GCC=/usr/bin/cc]
  ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper]
  ignore line: [Target: x86_64-pc-linux-gnu]
  ignore line: [Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp]
  ignore line: [Thread model: posix]
  ignore line: [gcc version 8.1.1 20180531 (GCC) ]
  ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/]
  ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../:/lib/:/usr/lib/]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_aff3a' '-mtune=generic' '-march=x86-64']
  link line: [ /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccZ8rdba.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_aff3a /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../.. CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crtn.o]
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/collect2] ==> ignore
    arg [-plugin] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/liblto_plugin.so] ==> ignore
    arg [-plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper] ==> ignore
    arg [-plugin-opt=-fresolution=/tmp/ccZ8rdba.res] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [-plugin-opt=-pass-through=-lc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [--build-id] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [--hash-style=gnu] ==> ignore
    arg [-m] ==> ignore
    arg [elf_x86_64] ==> ignore
    arg [-export-dynamic] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
    arg [-pie] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_aff3a] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/Scrt1.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crti.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtbeginS.o] ==> ignore
    arg [-L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1] ==> dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1]
    arg [-L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib]
    arg [-L/lib/../lib] ==> dir [/lib/../lib]
    arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
    arg [-L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../..] ==> dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../..]
    arg [CMakeFiles/cmTC_aff3a.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtendS.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crtn.o] ==> ignore
  collapse library dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1] ==> [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1]
  collapse library dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib] ==> [/usr/lib]
  collapse library dir [/lib/../lib] ==> [/lib]
  collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
  collapse library dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../..] ==> [/usr/lib]
  implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
  implicit dirs: [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1;/usr/lib;/lib]
  implicit fwks: []




Detecting C [-std=c11] compiler features compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_efd13/fast"
/usr/bin/make -f CMakeFiles/cmTC_efd13.dir/build.make CMakeFiles/cmTC_efd13.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_efd13.dir/feature_tests.c.o
/usr/bin/cc   -std=c11 -o CMakeFiles/cmTC_efd13.dir/feature_tests.c.o   -c /home/z3lt/Code/Cpp/thread/CMakeFiles/feature_tests.c
Linking C executable cmTC_efd13
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_efd13.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_efd13.dir/feature_tests.c.o  -o cmTC_efd13 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:1c_restrict
    Feature record: C_FEATURE:1c_static_assert
    Feature record: C_FEATURE:1c_variadic_macros


Detecting C [-std=c99] compiler features compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_2c4c4/fast"
/usr/bin/make -f CMakeFiles/cmTC_2c4c4.dir/build.make CMakeFiles/cmTC_2c4c4.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_2c4c4.dir/feature_tests.c.o
/usr/bin/cc   -std=c99 -o CMakeFiles/cmTC_2c4c4.dir/feature_tests.c.o   -c /home/z3lt/Code/Cpp/thread/CMakeFiles/feature_tests.c
Linking C executable cmTC_2c4c4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2c4c4.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_2c4c4.dir/feature_tests.c.o  -o cmTC_2c4c4 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:1c_restrict
    Feature record: C_FEATURE:0c_static_assert
    Feature record: C_FEATURE:1c_variadic_macros


Detecting C [-std=c90] compiler features compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e5d61/fast"
/usr/bin/make -f CMakeFiles/cmTC_e5d61.dir/build.make CMakeFiles/cmTC_e5d61.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e5d61.dir/feature_tests.c.o
/usr/bin/cc   -std=c90 -o CMakeFiles/cmTC_e5d61.dir/feature_tests.c.o   -c /home/z3lt/Code/Cpp/thread/CMakeFiles/feature_tests.c
Linking C executable cmTC_e5d61
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e5d61.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_e5d61.dir/feature_tests.c.o  -o cmTC_e5d61 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


    Feature record: C_FEATURE:1c_function_prototypes
    Feature record: C_FEATURE:0c_restrict
    Feature record: C_FEATURE:0c_static_assert
    Feature record: C_FEATURE:0c_variadic_macros
Determining if the CXX compiler works passed with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0397b/fast"
/usr/bin/make -f CMakeFiles/cmTC_0397b.dir/build.make CMakeFiles/cmTC_0397b.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0397b.dir/testCXXCompiler.cxx.o
/usr/bin/c++     -o CMakeFiles/cmTC_0397b.dir/testCXXCompiler.cxx.o -c /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_0397b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0397b.dir/link.txt --verbose=1
/usr/bin/c++       -rdynamic CMakeFiles/cmTC_0397b.dir/testCXXCompiler.cxx.o  -o cmTC_0397b 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_55d93/fast"
/usr/bin/make -f CMakeFiles/cmTC_55d93.dir/build.make CMakeFiles/cmTC_55d93.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o
/usr/bin/c++     -o CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.11/Modules/CMakeCXXCompilerABI.cpp
Linking CXX executable cmTC_55d93
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_55d93.dir/link.txt --verbose=1
/usr/bin/c++      -v -rdynamic CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o  -o cmTC_55d93 
Using built-in specs.
COLLECT_GCC=/usr/bin/c++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 8.1.1 20180531 (GCC) 
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_55d93' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cclA6bnr.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_55d93 /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../.. CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crtn.o
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_55d93' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


Parsed CXX implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command:"/usr/bin/make" "cmTC_55d93/fast"]
  ignore line: [/usr/bin/make -f CMakeFiles/cmTC_55d93.dir/build.make CMakeFiles/cmTC_55d93.dir/build]
  ignore line: [make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp']
  ignore line: [Building CXX object CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o]
  ignore line: [/usr/bin/c++     -o CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.11/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [Linking CXX executable cmTC_55d93]
  ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_55d93.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/c++      -v -rdynamic CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o  -o cmTC_55d93 ]
  ignore line: [Using built-in specs.]
  ignore line: [COLLECT_GCC=/usr/bin/c++]
  ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper]
  ignore line: [Target: x86_64-pc-linux-gnu]
  ignore line: [Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp]
  ignore line: [Thread model: posix]
  ignore line: [gcc version 8.1.1 20180531 (GCC) ]
  ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/]
  ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../:/lib/:/usr/lib/]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_55d93' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
  link line: [ /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cclA6bnr.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_55d93 /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../.. CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crtn.o]
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/collect2] ==> ignore
    arg [-plugin] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/liblto_plugin.so] ==> ignore
    arg [-plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/lto-wrapper] ==> ignore
    arg [-plugin-opt=-fresolution=/tmp/cclA6bnr.res] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [-plugin-opt=-pass-through=-lc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [--build-id] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [--hash-style=gnu] ==> ignore
    arg [-m] ==> ignore
    arg [elf_x86_64] ==> ignore
    arg [-export-dynamic] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
    arg [-pie] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_55d93] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/Scrt1.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crti.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtbeginS.o] ==> ignore
    arg [-L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1] ==> dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1]
    arg [-L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib]
    arg [-L/lib/../lib] ==> dir [/lib/../lib]
    arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
    arg [-L/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../..] ==> dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../..]
    arg [CMakeFiles/cmTC_55d93.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
    arg [-lstdc++] ==> lib [stdc++]
    arg [-lm] ==> lib [m]
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [-lgcc] ==> lib [gcc]
    arg [-lc] ==> lib [c]
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [-lgcc] ==> lib [gcc]
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/crtendS.o] ==> ignore
    arg [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib/crtn.o] ==> ignore
  collapse library dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1] ==> [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1]
  collapse library dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../lib] ==> [/usr/lib]
  collapse library dir [/lib/../lib] ==> [/lib]
  collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
  collapse library dir [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/../../..] ==> [/usr/lib]
  implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc]
  implicit dirs: [/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1;/usr/lib;/lib]
  implicit fwks: []




Detecting CXX [-std=c++1z] compiler features compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_71590/fast"
/usr/bin/make -f CMakeFiles/cmTC_71590.dir/build.make CMakeFiles/cmTC_71590.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_71590.dir/feature_tests.cxx.o
/usr/bin/c++    -std=c++1z -o CMakeFiles/cmTC_71590.dir/feature_tests.cxx.o -c /home/z3lt/Code/Cpp/thread/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_71590
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_71590.dir/link.txt --verbose=1
/usr/bin/c++       -rdynamic CMakeFiles/cmTC_71590.dir/feature_tests.cxx.o  -o cmTC_71590 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


    Feature record: CXX_FEATURE:1cxx_aggregate_default_initializers
    Feature record: CXX_FEATURE:1cxx_alias_templates
    Feature record: CXX_FEATURE:1cxx_alignas
    Feature record: CXX_FEATURE:1cxx_alignof
    Feature record: CXX_FEATURE:1cxx_attributes
    Feature record: CXX_FEATURE:1cxx_attribute_deprecated
    Feature record: CXX_FEATURE:1cxx_auto_type
    Feature record: CXX_FEATURE:1cxx_binary_literals
    Feature record: CXX_FEATURE:1cxx_constexpr
    Feature record: CXX_FEATURE:1cxx_contextual_conversions
    Feature record: CXX_FEATURE:1cxx_decltype
    Feature record: CXX_FEATURE:1cxx_decltype_auto
    Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types
    Feature record: CXX_FEATURE:1cxx_default_function_template_args
    Feature record: CXX_FEATURE:1cxx_defaulted_functions
    Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers
    Feature record: CXX_FEATURE:1cxx_delegating_constructors
    Feature record: CXX_FEATURE:1cxx_deleted_functions
    Feature record: CXX_FEATURE:1cxx_digit_separators
    Feature record: CXX_FEATURE:1cxx_enum_forward_declarations
    Feature record: CXX_FEATURE:1cxx_explicit_conversions
    Feature record: CXX_FEATURE:1cxx_extended_friend_declarations
    Feature record: CXX_FEATURE:1cxx_extern_templates
    Feature record: CXX_FEATURE:1cxx_final
    Feature record: CXX_FEATURE:1cxx_func_identifier
    Feature record: CXX_FEATURE:1cxx_generalized_initializers
    Feature record: CXX_FEATURE:1cxx_generic_lambdas
    Feature record: CXX_FEATURE:1cxx_inheriting_constructors
    Feature record: CXX_FEATURE:1cxx_inline_namespaces
    Feature record: CXX_FEATURE:1cxx_lambdas
    Feature record: CXX_FEATURE:1cxx_lambda_init_captures
    Feature record: CXX_FEATURE:1cxx_local_type_template_args
    Feature record: CXX_FEATURE:1cxx_long_long_type
    Feature record: CXX_FEATURE:1cxx_noexcept
    Feature record: CXX_FEATURE:1cxx_nonstatic_member_init
    Feature record: CXX_FEATURE:1cxx_nullptr
    Feature record: CXX_FEATURE:1cxx_override
    Feature record: CXX_FEATURE:1cxx_range_for
    Feature record: CXX_FEATURE:1cxx_raw_string_literals
    Feature record: CXX_FEATURE:1cxx_reference_qualified_functions
    Feature record: CXX_FEATURE:1cxx_relaxed_constexpr
    Feature record: CXX_FEATURE:1cxx_return_type_deduction
    Feature record: CXX_FEATURE:1cxx_right_angle_brackets
    Feature record: CXX_FEATURE:1cxx_rvalue_references
    Feature record: CXX_FEATURE:1cxx_sizeof_member
    Feature record: CXX_FEATURE:1cxx_static_assert
    Feature record: CXX_FEATURE:1cxx_strong_enums
    Feature record: CXX_FEATURE:1cxx_template_template_parameters
    Feature record: CXX_FEATURE:1cxx_thread_local
    Feature record: CXX_FEATURE:1cxx_trailing_return_types
    Feature record: CXX_FEATURE:1cxx_unicode_literals
    Feature record: CXX_FEATURE:1cxx_uniform_initialization
    Feature record: CXX_FEATURE:1cxx_unrestricted_unions
    Feature record: CXX_FEATURE:1cxx_user_literals
    Feature record: CXX_FEATURE:1cxx_variable_templates
    Feature record: CXX_FEATURE:1cxx_variadic_macros
    Feature record: CXX_FEATURE:1cxx_variadic_templates


Detecting CXX [-std=c++14] compiler features compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_5c349/fast"
/usr/bin/make -f CMakeFiles/cmTC_5c349.dir/build.make CMakeFiles/cmTC_5c349.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_5c349.dir/feature_tests.cxx.o
/usr/bin/c++    -std=c++14 -o CMakeFiles/cmTC_5c349.dir/feature_tests.cxx.o -c /home/z3lt/Code/Cpp/thread/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_5c349
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5c349.dir/link.txt --verbose=1
/usr/bin/c++       -rdynamic CMakeFiles/cmTC_5c349.dir/feature_tests.cxx.o  -o cmTC_5c349 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


    Feature record: CXX_FEATURE:1cxx_aggregate_default_initializers
    Feature record: CXX_FEATURE:1cxx_alias_templates
    Feature record: CXX_FEATURE:1cxx_alignas
    Feature record: CXX_FEATURE:1cxx_alignof
    Feature record: CXX_FEATURE:1cxx_attributes
    Feature record: CXX_FEATURE:1cxx_attribute_deprecated
    Feature record: CXX_FEATURE:1cxx_auto_type
    Feature record: CXX_FEATURE:1cxx_binary_literals
    Feature record: CXX_FEATURE:1cxx_constexpr
    Feature record: CXX_FEATURE:1cxx_contextual_conversions
    Feature record: CXX_FEATURE:1cxx_decltype
    Feature record: CXX_FEATURE:1cxx_decltype_auto
    Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types
    Feature record: CXX_FEATURE:1cxx_default_function_template_args
    Feature record: CXX_FEATURE:1cxx_defaulted_functions
    Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers
    Feature record: CXX_FEATURE:1cxx_delegating_constructors
    Feature record: CXX_FEATURE:1cxx_deleted_functions
    Feature record: CXX_FEATURE:1cxx_digit_separators
    Feature record: CXX_FEATURE:1cxx_enum_forward_declarations
    Feature record: CXX_FEATURE:1cxx_explicit_conversions
    Feature record: CXX_FEATURE:1cxx_extended_friend_declarations
    Feature record: CXX_FEATURE:1cxx_extern_templates
    Feature record: CXX_FEATURE:1cxx_final
    Feature record: CXX_FEATURE:1cxx_func_identifier
    Feature record: CXX_FEATURE:1cxx_generalized_initializers
    Feature record: CXX_FEATURE:1cxx_generic_lambdas
    Feature record: CXX_FEATURE:1cxx_inheriting_constructors
    Feature record: CXX_FEATURE:1cxx_inline_namespaces
    Feature record: CXX_FEATURE:1cxx_lambdas
    Feature record: CXX_FEATURE:1cxx_lambda_init_captures
    Feature record: CXX_FEATURE:1cxx_local_type_template_args
    Feature record: CXX_FEATURE:1cxx_long_long_type
    Feature record: CXX_FEATURE:1cxx_noexcept
    Feature record: CXX_FEATURE:1cxx_nonstatic_member_init
    Feature record: CXX_FEATURE:1cxx_nullptr
    Feature record: CXX_FEATURE:1cxx_override
    Feature record: CXX_FEATURE:1cxx_range_for
    Feature record: CXX_FEATURE:1cxx_raw_string_literals
    Feature record: CXX_FEATURE:1cxx_reference_qualified_functions
    Feature record: CXX_FEATURE:1cxx_relaxed_constexpr
    Feature record: CXX_FEATURE:1cxx_return_type_deduction
    Feature record: CXX_FEATURE:1cxx_right_angle_brackets
    Feature record: CXX_FEATURE:1cxx_rvalue_references
    Feature record: CXX_FEATURE:1cxx_sizeof_member
    Feature record: CXX_FEATURE:1cxx_static_assert
    Feature record: CXX_FEATURE:1cxx_strong_enums
    Feature record: CXX_FEATURE:1cxx_template_template_parameters
    Feature record: CXX_FEATURE:1cxx_thread_local
    Feature record: CXX_FEATURE:1cxx_trailing_return_types
    Feature record: CXX_FEATURE:1cxx_unicode_literals
    Feature record: CXX_FEATURE:1cxx_uniform_initialization
    Feature record: CXX_FEATURE:1cxx_unrestricted_unions
    Feature record: CXX_FEATURE:1cxx_user_literals
    Feature record: CXX_FEATURE:1cxx_variable_templates
    Feature record: CXX_FEATURE:1cxx_variadic_macros
    Feature record: CXX_FEATURE:1cxx_variadic_templates


Detecting CXX [-std=c++11] compiler features compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_b7c24/fast"
/usr/bin/make -f CMakeFiles/cmTC_b7c24.dir/build.make CMakeFiles/cmTC_b7c24.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_b7c24.dir/feature_tests.cxx.o
/usr/bin/c++    -std=c++11 -o CMakeFiles/cmTC_b7c24.dir/feature_tests.cxx.o -c /home/z3lt/Code/Cpp/thread/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_b7c24
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b7c24.dir/link.txt --verbose=1
/usr/bin/c++       -rdynamic CMakeFiles/cmTC_b7c24.dir/feature_tests.cxx.o  -o cmTC_b7c24 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


    Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers
    Feature record: CXX_FEATURE:1cxx_alias_templates
    Feature record: CXX_FEATURE:1cxx_alignas
    Feature record: CXX_FEATURE:1cxx_alignof
    Feature record: CXX_FEATURE:1cxx_attributes
    Feature record: CXX_FEATURE:0cxx_attribute_deprecated
    Feature record: CXX_FEATURE:1cxx_auto_type
    Feature record: CXX_FEATURE:0cxx_binary_literals
    Feature record: CXX_FEATURE:1cxx_constexpr
    Feature record: CXX_FEATURE:0cxx_contextual_conversions
    Feature record: CXX_FEATURE:1cxx_decltype
    Feature record: CXX_FEATURE:0cxx_decltype_auto
    Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types
    Feature record: CXX_FEATURE:1cxx_default_function_template_args
    Feature record: CXX_FEATURE:1cxx_defaulted_functions
    Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers
    Feature record: CXX_FEATURE:1cxx_delegating_constructors
    Feature record: CXX_FEATURE:1cxx_deleted_functions
    Feature record: CXX_FEATURE:0cxx_digit_separators
    Feature record: CXX_FEATURE:1cxx_enum_forward_declarations
    Feature record: CXX_FEATURE:1cxx_explicit_conversions
    Feature record: CXX_FEATURE:1cxx_extended_friend_declarations
    Feature record: CXX_FEATURE:1cxx_extern_templates
    Feature record: CXX_FEATURE:1cxx_final
    Feature record: CXX_FEATURE:1cxx_func_identifier
    Feature record: CXX_FEATURE:1cxx_generalized_initializers
    Feature record: CXX_FEATURE:0cxx_generic_lambdas
    Feature record: CXX_FEATURE:1cxx_inheriting_constructors
    Feature record: CXX_FEATURE:1cxx_inline_namespaces
    Feature record: CXX_FEATURE:1cxx_lambdas
    Feature record: CXX_FEATURE:0cxx_lambda_init_captures
    Feature record: CXX_FEATURE:1cxx_local_type_template_args
    Feature record: CXX_FEATURE:1cxx_long_long_type
    Feature record: CXX_FEATURE:1cxx_noexcept
    Feature record: CXX_FEATURE:1cxx_nonstatic_member_init
    Feature record: CXX_FEATURE:1cxx_nullptr
    Feature record: CXX_FEATURE:1cxx_override
    Feature record: CXX_FEATURE:1cxx_range_for
    Feature record: CXX_FEATURE:1cxx_raw_string_literals
    Feature record: CXX_FEATURE:1cxx_reference_qualified_functions
    Feature record: CXX_FEATURE:0cxx_relaxed_constexpr
    Feature record: CXX_FEATURE:0cxx_return_type_deduction
    Feature record: CXX_FEATURE:1cxx_right_angle_brackets
    Feature record: CXX_FEATURE:1cxx_rvalue_references
    Feature record: CXX_FEATURE:1cxx_sizeof_member
    Feature record: CXX_FEATURE:1cxx_static_assert
    Feature record: CXX_FEATURE:1cxx_strong_enums
    Feature record: CXX_FEATURE:1cxx_template_template_parameters
    Feature record: CXX_FEATURE:1cxx_thread_local
    Feature record: CXX_FEATURE:1cxx_trailing_return_types
    Feature record: CXX_FEATURE:1cxx_unicode_literals
    Feature record: CXX_FEATURE:1cxx_uniform_initialization
    Feature record: CXX_FEATURE:1cxx_unrestricted_unions
    Feature record: CXX_FEATURE:1cxx_user_literals
    Feature record: CXX_FEATURE:0cxx_variable_templates
    Feature record: CXX_FEATURE:1cxx_variadic_macros
    Feature record: CXX_FEATURE:1cxx_variadic_templates


Detecting CXX [-std=c++98] compiler features compiled with the following output:
Change Dir: /home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_d506f/fast"
/usr/bin/make -f CMakeFiles/cmTC_d506f.dir/build.make CMakeFiles/cmTC_d506f.dir/build
make[1]: Entering directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_d506f.dir/feature_tests.cxx.o
/usr/bin/c++    -std=c++98 -o CMakeFiles/cmTC_d506f.dir/feature_tests.cxx.o -c /home/z3lt/Code/Cpp/thread/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_d506f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d506f.dir/link.txt --verbose=1
/usr/bin/c++       -rdynamic CMakeFiles/cmTC_d506f.dir/feature_tests.cxx.o  -o cmTC_d506f 
make[1]: Leaving directory '/home/z3lt/Code/Cpp/thread/CMakeFiles/CMakeTmp'


    Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers
    Feature record: CXX_FEATURE:0cxx_alias_templates
    Feature record: CXX_FEATURE:0cxx_alignas
    Feature record: CXX_FEATURE:0cxx_alignof
    Feature record: CXX_FEATURE:0cxx_attributes
    Feature record: CXX_FEATURE:0cxx_attribute_deprecated
    Feature record: CXX_FEATURE:0cxx_auto_type
    Feature record: CXX_FEATURE:0cxx_binary_literals
    Feature record: CXX_FEATURE:0cxx_constexpr
    Feature record: CXX_FEATURE:0cxx_contextual_conversions
    Feature record: CXX_FEATURE:0cxx_decltype
    Feature record: CXX_FEATURE:0cxx_decltype_auto
    Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types
    Feature record: CXX_FEATURE:0cxx_default_function_template_args
    Feature record: CXX_FEATURE:0cxx_defaulted_functions
    Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers
    Feature record: CXX_FEATURE:0cxx_delegating_constructors
    Feature record: CXX_FEATURE:0cxx_deleted_functions
    Feature record: CXX_FEATURE:0cxx_digit_separators
    Feature record: CXX_FEATURE:0cxx_enum_forward_declarations
    Feature record: CXX_FEATURE:0cxx_explicit_conversions
    Feature record: CXX_FEATURE:0cxx_extended_friend_declarations
    Feature record: CXX_FEATURE:0cxx_extern_templates
    Feature record: CXX_FEATURE:0cxx_final
    Feature record: CXX_FEATURE:0cxx_func_identifier
    Feature record: CXX_FEATURE:0cxx_generalized_initializers
    Feature record: CXX_FEATURE:0cxx_generic_lambdas
    Feature record: CXX_FEATURE:0cxx_inheriting_constructors
    Feature record: CXX_FEATURE:0cxx_inline_namespaces
    Feature record: CXX_FEATURE:0cxx_lambdas
    Feature record: CXX_FEATURE:0cxx_lambda_init_captures
    Feature record: CXX_FEATURE:0cxx_local_type_template_args
    Feature record: CXX_FEATURE:0cxx_long_long_type
    Feature record: CXX_FEATURE:0cxx_noexcept
    Feature record: CXX_FEATURE:0cxx_nonstatic_member_init
    Feature record: CXX_FEATURE:0cxx_nullptr
    Feature record: CXX_FEATURE:0cxx_override
    Feature record: CXX_FEATURE:0cxx_range_for
    Feature record: CXX_FEATURE:0cxx_raw_string_literals
    Feature record: CXX_FEATURE:0cxx_reference_qualified_functions
    Feature record: CXX_FEATURE:0cxx_relaxed_constexpr
    Feature record: CXX_FEATURE:0cxx_return_type_deduction
    Feature record: CXX_FEATURE:0cxx_right_angle_brackets
    Feature record: CXX_FEATURE:0cxx_rvalue_references
    Feature record: CXX_FEATURE:0cxx_sizeof_member
    Feature record: CXX_FEATURE:0cxx_static_assert
    Feature record: CXX_FEATURE:0cxx_strong_enums
    Feature record: CXX_FEATURE:1cxx_template_template_parameters
    Feature record: CXX_FEATURE:0cxx_thread_local
    Feature record: CXX_FEATURE:0cxx_trailing_return_types
    Feature record: CXX_FEATURE:0cxx_unicode_literals
    Feature record: CXX_FEATURE:0cxx_uniform_initialization
    Feature record: CXX_FEATURE:0cxx_unrestricted_unions
    Feature record: CXX_FEATURE:0cxx_user_literals
    Feature record: CXX_FEATURE:0cxx_variable_templates
    Feature record: CXX_FEATURE:0cxx_variadic_macros
    Feature record: CXX_FEATURE:0cxx_variadic_templates

Actually its for a different CMakeLists.txt but error is still the same.

Last edited by z3lt (2018-07-18 20:19:44)

Offline

#6 2018-07-18 20:26:21

loqs
Member
Registered: 2014-03-06
Posts: 17,782

Re: [SOLVED] CMake add_package problem

Difference seems to be this is present at the end of my system's CMakeOutput.log

Determining if the include file pthread.h exists passed with the following output:
Change Dir: /tmp/testcmake/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_c1996/fast"
/usr/bin/make -f CMakeFiles/cmTC_c1996.dir/build.make CMakeFiles/cmTC_c1996.dir/build
make[1]: Entering directory '/tmp/testcmake/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c1996.dir/CheckIncludeFile.c.o
/usr/bin/cc   -Wall -g -std=c++17 -pthread    -o CMakeFiles/cmTC_c1996.dir/CheckIncludeFile.c.o   -c /tmp/testcmake/CMakeFiles/CMakeTmp/CheckIncludeFile.c
cc1: warning: command line option ‘-std=c++17’ is valid for C++/ObjC++ but not for C
Linking C executable cmTC_c1996
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c1996.dir/link.txt --verbose=1
/usr/bin/cc -Wall -g -std=c++17 -pthread     -rdynamic CMakeFiles/cmTC_c1996.dir/CheckIncludeFile.c.o  -o cmTC_c1996 
make[1]: Leaving directory '/tmp/testcmake/CMakeFiles/CMakeTmp'


Determining if the pthread_create exist passed with the following output:
Change Dir: /tmp/testcmake/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_8b7d4/fast"
/usr/bin/make -f CMakeFiles/cmTC_8b7d4.dir/build.make CMakeFiles/cmTC_8b7d4.dir/build
make[1]: Entering directory '/tmp/testcmake/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8b7d4.dir/CheckSymbolExists.c.o
/usr/bin/cc   -Wall -g -std=c++17 -pthread    -o CMakeFiles/cmTC_8b7d4.dir/CheckSymbolExists.c.o   -c /tmp/testcmake/CMakeFiles/CMakeTmp/CheckSymbolExists.c
cc1: warning: command line option ‘-std=c++17’ is valid for C++/ObjC++ but not for C
Linking C executable cmTC_8b7d4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8b7d4.dir/link.txt --verbose=1
/usr/bin/cc -Wall -g -std=c++17 -pthread     -rdynamic CMakeFiles/cmTC_8b7d4.dir/CheckSymbolExists.c.o  -o cmTC_8b7d4 
make[1]: Leaving directory '/tmp/testcmake/CMakeFiles/CMakeTmp'

File /tmp/testcmake/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Offline

#7 2018-07-18 21:22:58

z3lt
Member
Registered: 2018-07-18
Posts: 5

Re: [SOLVED] CMake add_package problem

After moving to new dir (not changing CMakeLists.txt) i got same CmakeOutput.log like you. (meaning no cmake errors)
Now make doesn't seem to work, but i guess I'll figure something out.

[z3lt-lu@Arch threads]$ make
[ 50%] Linking CXX executable thread
CMakeFiles/thread.dir/main.cpp.o: In function `std::thread::thread<void (&)()>(void (&)())':
main.cpp:(.text._ZNSt6threadC2IRFvvEJEEEOT_DpOT0_[_ZNSt6threadC5IRFvvEJEEEOT_DpOT0_]+0x2f): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/thread.dir/build.make:84: thread] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/thread.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

and here is simple code, maybe i did something wrong.

#include <iostream>
#include <thread>
#include <string>

using namespace std;

void function_1()
{
    for(int i = 0; i < 10; i++)
        cout<<"f1:"<<i<<endl;
}

int main(int argc, char* args[])
{
    thread t1(function_1);
    function_1();
    t1.join();

    return 0;
}

Then again 'CMake add_package problem' could be considered solved.

Offline

#8 2018-07-18 22:03:03

loqs
Member
Registered: 2014-03-06
Posts: 17,782

Re: [SOLVED] CMake add_package problem

set(THREADS_PREFER_PTHREADS_FLAG ON) should be set(THREADS_PREFER_PTHREAD_FLAG TRUE) and
set(CMAKE_THREAD_PREFER_PTHREADS TRUE) should be set(THREADS_PREFER_PTHREAD_FLAG TRUE)

cmake_minimum_required (VERSION 3.1)
project (pname)

#set( CMAKE_C_FLAGS "-Wall -g -std=c++17 -pthread" )
#set( CMAKE_EXPORT_COMPILE_COMMANDS ON )

set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)

find_package( Threads REQUIRED )
add_executable( test main.cpp )
#target_link_libraries( thread ${CMAKE_THREAD_LIBS_INIT} )
target_link_libraries( test Threads::Threads )

Offline

#9 2018-07-19 05:53:08

z3lt
Member
Registered: 2018-07-18
Posts: 5

Re: [SOLVED] CMake add_package problem

Finally got it to work. (both cmake and make)
Moved CMakeLists.txt and main.cpp to fresh dir.
CMakeLists.txt

cmake_minimum_required (VERSION 3.0)
project (Treads)

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++1z -pthread" )
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )


set(THREADS_PREFER_PTHREAD_FLAG TRUE)
#set(CMAKE_THREAD_PREFER_PTHREAD ON)

find_package( Threads REQUIRED )

MESSAGE( STATUS "variable is: " ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_CXX_FLAGS})

add_executable( thread main.cpp )
target_link_libraries( thread ${CMAKE_THREAD_LIBS_INIT} )

Project name used to be 'Threads' which could have been a problem.
CMAKE_C_FLAGS instead of CMAKE_CXX_FLAGS could have been a problem as well.
I am glad it wrks, thanks for help.

don't mind the message thing xd

Last edited by z3lt (2018-07-19 05:54:10)

Offline

Board footer

Powered by FluxBB