Created
April 30, 2019 16:53
-
-
Save LebedevRI/52c2fee1c14074fbaa09ec3cb0e5e15b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 2.8.12) | |
project (test CXX C) | |
set(THREADS_PREFER_PTHREAD_FLAG ON) | |
find_package(Threads REQUIRED) | |
add_executable(zzzzzz zzzzzz.cc) | |
target_link_libraries(zzzzzz Threads::Threads) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ CC=gcc-8 CXX=g++-8 CFLAGS="-fsanitize=address " CXXFLAGS="-fsanitize=address " cmake ../ && make VERBOSE=1 zzzzzz | |
/usr/bin/g++-8 -fsanitize=address -o CMakeFiles/zzzzzz.dir/zzzzzz.cc.o -c /home/lebedevri/cmake-bug-pthread/zzzzzz.cc | |
[100%] Linking CXX executable zzzzzz | |
/usr/bin/cmake -E cmake_link_script CMakeFiles/zzzzzz.dir/link.txt --verbose=1 | |
/usr/bin/g++-8 -fsanitize=address -rdynamic CMakeFiles/zzzzzz.dir/zzzzzz.cc.o -o zzzzzz | |
$ CC=gcc-8 CXX=g++-8 cmake ../ && make VERBOSE=1 zzzzzz | |
[ 50%] Building CXX object CMakeFiles/zzzzzz.dir/zzzzzz.cc.o | |
/usr/bin/g++-8 -pipe -pthread -o CMakeFiles/zzzzzz.dir/zzzzzz.cc.o -c /home/lebedevri/cmake-bug-pthread/zzzzzz.cc | |
[100%] Linking CXX executable zzzzzz | |
/usr/bin/cmake -E cmake_link_script CMakeFiles/zzzzzz.dir/link.txt --verbose=1 | |
/usr/bin/g++-8 -pipe -rdynamic CMakeFiles/zzzzzz.dir/zzzzzz.cc.o -o zzzzzz -pthread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() {return 0;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment