[Rock-dev] using c++11 CMAKE_CXX_FLAGS
Martin Zenzes
martin.zenzes at dfki.de
Mon Dec 8 12:33:53 CET 2014
On 12/08/2014 11:51 AM, Leif Christensen wrote:
> Hi,
>
> I was wondering, if using the c++11 standard in my lib (perhaps later
> using base-types) would break any Rock stuff? Couldn't image how, but
> just to be sure.
>
> Using it like this in my CMakeLists.txt
>> list(APPEND CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
I never used this idiom. But as stated here [1]:
> If you specify any CMAKE_CXX_FLAGS from the command line, the second
method will produce a semicolon in the build command (and repeat the
original CMAKE_CXX_FLAGS twice)
The following solution is suggested here [2]:
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
Most of the time I use "add_definitions()" for flags like these, which
works most of the time but is actually "wrong"...
[1]
https://stackoverflow.com/questions/10851247/how-to-activate-c-11-in-cmake#comment24241515_10852679
[2] http://stackoverflow.com/a/20826165/3520187
Martin
--
M.Sc. Martin Zenzes
Space Robotics
Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0) 421 178 45 - 6658
Fax: +49 (0) 421 178 45 - 4150
E-Mail: martin.zenzes at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
More information about the Rock-dev
mailing list