![]() usr/local/include/boost/type_traits/detail/common_arithmetic_type.hpp:209:75: error: expected expressionīOOST_STATIC_CONSTANT(int, selector = sizeof(select(cond() ? T() : U()))) In file included from /usr/local/include/boost/type_traits/detail/common_type_impl.hpp:12: In file included from /usr/local/include/boost/type_traits/common_type.hpp:22: In file included from /usr/local/include/boost/chrono/duration.hpp:42: In file included from /usr/local/include/boost/thread/detail/platform_time.hpp:19: In file included from /usr/local/include/boost/thread/pthread/condition_variable.hpp:9: In file included from /usr/local/include/boost/thread/condition_variable.hpp:16: In file included from /usr/local/include/pplx/pplxlinux.h:27: In file included from /usr/local/include/pplx/pplx.h:47: In file included from /usr/local/include/pplx/pplxtasks.h:61: In file included from /usr/local/include/cpprest/asyncrt_utils.h:17: In file included from /usr/local/include/cpprest/http_client.h:47: In file included from /Users/taylor/development/EveDataRetriever/EveDataRetriever.h:6: In file included from /Users/taylor/development/EveDataRetriever/EveDataRetriever.cpp:4: These come from the CPPRestSDK headers and are only errors if you’re not compiling with C++11 or above: Building CXX object CMakeFiles/EveDataRetriever.dir/ ![]() If I use CMAKE_CXX_STANDARD to generate Makefiles on MacOS here are the beginning of the compile time errors. This is setup this way because, at present, using the CMake variables did not set the command line options correctly for clang on MacOS. Everybody else gets the following to set -std=c++11 directly: set(CMAKE_CXX_FLAGS "$ -std=c++11")Īdd_definitions(-std=c++11) Why don’t I use CMAKE_CXX_STANDARD for MacOS? You’ll also notice that they’re only set for MSVC. That is to use the following settings: set(CMAKE_CXX_STANDARD 11)Īs you can see in my CMakeLists.txt I’ve got these set. Given that my project is relatively simple (so far) I’m attracted to the idea that Craig Scott posted. ![]() You can find the project here and the CMakeLists.txt here. This, of course, is likely the first question that comes to mind for anybody who knows CMake well. Please see the conclusion for more thoughts on this. I would like to thank the folks in the CPPLang Slack community for helping me identify that this was the problem. I have updated the CMakeLists.txt to have the properties set before the add_executable call and, lo and behold, it works appropriately. It expects all properties related to a target before you declare that target with add_executable or add_library. It turns out that I had a misunderstanding of how CMake expected targets to be declared.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |