[CMake] Specifying compilers?

Júlio Hoffimann julio.hoffimann at gmail.com
Wed Aug 22 20:56:17 EDT 2012


I'm very new to CMake, but we can see the C++11 flags are not showing up in
your VERBOSE output.

The way i'm adding flags is by using:

add_definitions(-Wall -Wextra -std=c++0x -pedantic)

Don't know if is the more appropriate CMake command though.

Regards,
Júlio.

2012/8/22 Jason T. Slack-Moehrle <slackmoehrle at gmail.com>

> > Can you provide the output of "make VERBOSE=1"?
>
> Absolutely.
>
> $ ./build.sh
> -- The C compiler identification is Clang 4.0.0
> -- The CXX compiler identification is Clang 4.0.0
> -- Check for working C compiler: /usr/bin/clang
> -- Check for working C compiler: /usr/bin/clang -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/clang++
> -- Check for working CXX compiler: /usr/bin/clang++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
> -- Found GLUT: -framework GLUT
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /Users/jtsm/Dropbox/Projects/All-Stars
> "/Applications/CMake 2.8-9.app/Contents/bin/cmake"
> -H/Users/jtsm/Dropbox/Projects/All-Stars
> -B/Users/jtsm/Dropbox/Projects/All-Stars --check-build-system
> CMakeFiles/Makefile.cmake 0
> "/Applications/CMake 2.8-9.app/Contents/bin/cmake" -E
> cmake_progress_start /Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles
> /Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles/progress.marks
> make -f CMakeFiles/Makefile2 all
> make -f CMakeFiles/All-Stars.dir/build.make CMakeFiles/All-Stars.dir/depend
> cd /Users/jtsm/Dropbox/Projects/All-Stars && "/Applications/CMake
> 2.8-9.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles"
> /Users/jtsm/Dropbox/Projects/All-Stars
> /Users/jtsm/Dropbox/Projects/All-Stars
> /Users/jtsm/Dropbox/Projects/All-Stars
> /Users/jtsm/Dropbox/Projects/All-Stars
>
> /Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles/All-Stars.dir/DependInfo.cmake
> --color=
> Dependee
> "/Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles/All-Stars.dir/DependInfo.cmake"
> is newer than depender
>
> "/Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles/All-Stars.dir/depend.internal".
> Dependee
> "/Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles/CMakeDirectoryInformation.cmake"
> is newer than depender
>
> "/Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles/All-Stars.dir/depend.internal".
> Scanning dependencies of target All-Stars
> make -f CMakeFiles/All-Stars.dir/build.make CMakeFiles/All-Stars.dir/build
> "/Applications/CMake 2.8-9.app/Contents/bin/cmake" -E
> cmake_progress_report
> /Users/jtsm/Dropbox/Projects/All-Stars/CMakeFiles 1
> [100%] Building CXX object CMakeFiles/All-Stars.dir/main.cpp.o
> /usr/bin/clang++    -I/Users/jtsm/Dropbox/Projects/All-Stars
> -I/System/Library/Frameworks/GLUT.framework/Headers    -o
> CMakeFiles/All-Stars.dir/main.cpp.o -c
> /Users/jtsm/Dropbox/Projects/All-Stars/main.cpp
> /Users/jtsm/Dropbox/Projects/All-Stars/main.cpp:4:10: fatal error:
> 'thread' file not found
> #include <thread>
>          ^
> 1 error generated.
> make[2]: *** [CMakeFiles/All-Stars.dir/main.cpp.o] Error 1
> make[1]: *** [CMakeFiles/All-Stars.dir/all] Error 2
> make: *** [all] Error 2
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120822/6b77669f/attachment.htm>


More information about the CMake mailing list