# General ############################################################################### # Activate C++0x support (if you encounter gmock errors, use 1.6.0 version) #add_definitions(-std=c++0x) # Extra warnings #add_definitions(-Wextra) # Google Mock & Test ############################################################################### #add_subdirectory(${GMOCK_ROOT}) #include_directories(${GMOCK_ROOT}/include) #include_directories(${GMOCK_ROOT}/gtest/include) # Main program executable ############################################################################### include_directories("/usr/local/include") link_directories("/usr/local/lib") # Include root directory include_directories(BEFORE ".") include_directories(BEFORE "src/")
set(EXECUTABLE_NAME "program") # Source files file(GLOB SRC_FILES "src/*.cpp" "src/*.h") # Set link libraries # target_link_libraries($EXECUTABLE_NAME ...) # Tests executable ############################################################################### set(TEST_EXECUTABLE_NAME "tests") # Test files file(GLOB TEST_FILES "test/*.cpp") # Don't include Main.cpp from src file(GLOB MAIN_SRC "src/main.cpp") list(REMOVE_ITEM SRC_FILES ${MAIN_SRC})
# Set link libraries (order matters) #target_link_libraries("${TEST_EXECUTABLE_NAME}" gmock gtest pthread) set(Boost_USE_STATIC_LIBS ON) # only find static libs set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) find_package(Boost 1.36.0 COMPONENTS date_time filesystem system graph)
Unfortunately with a CMakeLists.txt like the second I cannot compile boost ... I think for an etensive use of C++11 featere like nullptr, stoi .... etc
Unfortunately with a CMakeLists.txt like the second I cannot compile boost ... I think for an etensive use of C++11 featere like nullptr, stoi .... etc
Unfortunately with a CMakeLists.txt like the second I cannot compile boost ... I think for an etensive use of C++11 featere like nullptr, stoi .... etc
Thank you for the details! We have issue about support clang libc++ renderers in our tracker: https://youtrack.jetbrains.com/issue/CPP-2437 Feel free to comment to upvote. Follow to get the updates.
There are still some unresolved issues, but in most cases it works correctly.
For me it's impossible to debug on OSX yosemite with
Hi Massimo.
Could you please specify what libraries are you using in your project and which gcc, gdb versions are used?
Thanks for the quick reply!!!
here my CMakeLists.txt
massimo@massimos-mbp:~$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
and
massimo@massimos-mbp:~$ gdb --version
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
Ah I forgot to say that for a project c++98 linking
the debugger is working
Hi Massimo.
You said that it's impossible to debug, do you get any errors?
How does it look like?
Are you able to debug your project using gdb console?
Hi Anna,
I created this simple Hello World exampe
And I put a break point on the return statement
if I use this CMakeList.txt
The string test is shown as std::__1::__basic_string<comm ....
instead with a CMakeList.txt like
The string is shown in a "pretty" way
Unfortunately with a CMakeLists.txt like the second I cannot compile boost ... I think for an etensive use of C++11 featere like nullptr, stoi .... etc
thanks
Massimo
Attachment(s):
Screen Shot 2015-03-26 at 15.26.17.png
Screen Shot 2015-03-26 at 15.21.40.png
Hi Anna,
I created this simple Hello World exampe
And I put a break point on the return statement
if I use this CMakeList.txt
The string test is shown as std::__1::__basic_string<comm ....
instead with a CMakeList.txt like
The string is shown in a "pretty" way
Unfortunately with a CMakeLists.txt like the second I cannot compile boost ... I think for an etensive use of C++11 featere like nullptr, stoi .... etc
thanks
Massimo
Hi Anna,
I created this simple Hello World exampe
And I put a break point on the return statement
if I use this CMakeList.txt
The string test is shown as std::__1::__basic_string<comm ....
instead with a CMakeList.txt like
The string is shown in a "pretty" way
Unfortunately with a CMakeLists.txt like the second I cannot compile boost ... I think for an etensive use of C++11 featere like nullptr, stoi .... etc
thanks
Massimo
Hi Massimo.
We have issue about support clang libc++ renderers in our tracker:
https://youtrack.jetbrains.com/issue/CPP-2437
Feel free to comment to upvote.
Follow to get the updates.