[ITK-users] C++11?

Johnson, Hans J hans-johnson at uiowa.edu
Sun Apr 13 11:33:58 EDT 2014


Jared,

ADD_DEFINTIONS is not intended for compiler flags.  You need to configure
the build initializing with the C++ flags

CXX=Œ/usr/bin/clang¹ CXX_FLAGS=³-std=c++11²  ccmake ../ITK

Hans



On 4/12/14, 10:41 PM, "Becksfort, Jared" <Jared.Becksfort at STJUDE.ORG>
wrote:

>Hello,
>
>I was hoping to build the 4.5.2 with C++11.  Are there instructions for
>doing so?  I tried adding
>
>ADD_DEFINITIONS(
>    -std=c++11
>)
>
>to the CMakeLists.txt file, which felt like a hack and didn't work:
>
>Scanning dependencies of target itksys
>[ 21%] Building C object
>Modules/ThirdParty/KWSys/src/KWSys/CMakeFiles/itksys.dir/ProcessUNIX.c.o
>error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
>make[2]: ***
>[Modules/ThirdParty/KWSys/src/KWSys/CMakeFiles/itksys.dir/ProcessUNIX.c.o]
> Error 1
>make[1]: ***
>[Modules/ThirdParty/KWSys/src/KWSys/CMakeFiles/itksys.dir/all] Error 2
>make: *** [all] Error 2
>
>Thanks,
>Jared
>
>Email Disclaimer:  www.stjude.org/emaildisclaimer
>Consultation Disclaimer:  www.stjude.org/consultationdisclaimer
>
>_____________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://www.kitware.com/products/protraining.php
>
>Please keep messages on-topic and check the ITK FAQ at:
>http://www.itk.org/Wiki/ITK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.itk.org/mailman/listinfo/insight-users



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-users mailing list