sumit_tuwien Posted May 25, 2018 Report Share Posted May 25, 2018 Hello All, cmake ../ -DCMAKE_CXX_STANDARD=11 enables gcc specific switch -std=gnu++11 and "not" standard -std=c++11 And this is creating some side effects: When I try to use clang: cmake ../ -DCMAKE_CXX_STANDARD=11 -DCMAKE_INSTALL_PREFIX=/home/sumit/systemc-2.3.2/ -DBUILD_SOURCE_DOCUMENTATION=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ I see -std=c++11 option is not enabled during compilation: ............................................ [ 9%] Building CXX object src/CMakeFiles/systemc.dir/sysc/communication/sc_signal_ports.cpp.o cd /home/sumit/install/systemc-2.3.2/objdir/src && /usr/bin/clang++ -DSC_BUILD -DSC_ENABLE_ASSERTIONS -DSC_ENABLE_EARLY_MAXTIME_CREATION -DSC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING -DSC_INCLUDE_FX -I/home/sumit/install/systemc-2.3.2/src -O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -pthread -o CMakeFiles/systemc.dir/sysc/communication/sc_signal_ports.cpp.o -c /home/sumit/install/systemc-2.3.2/src/sysc/communication/sc_signal_ports.cpp [ 9%] Building CXX object src/CMakeFiles/systemc.dir/sysc/communication/sc_signal_resolved.cpp.o cd /home/sumit/install/systemc-2.3.2/objdir/src && /usr/bin/clang++ -DSC_BUILD -DSC_ENABLE_ASSERTIONS -DSC_ENABLE_EARLY_MAXTIME_CREATION -DSC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING -DSC_INCLUDE_FX -I/home/sumit/install/systemc-2.3.2/src -O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -pthread -o CMakeFiles/systemc.dir/sysc/communication/sc_signal_resolved.cpp.o -c /home/sumit/install/systemc-2.3.2/src/sysc/communication/sc_signal_resolved.cpp [ 9%] Building CXX object src/CMakeFiles/systemc.dir/sysc/communication/sc_signal_resolved_ports.cpp.o cd /home/sumit/install/systemc-2.3.2/objdir/src && /usr/bin/clang++ -DSC_BUILD -DSC_ENABLE_ASSERTIONS -DSC_ENABLE_EARLY_MAXTIME_CREATION -DSC_ENABLE_SIMULATION_PHASE_CALLBACKS_TRACING -DSC_INCLUDE_FX -I/home/sumit/install/systemc-2.3.2/src -O3 -DNDEBUG -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -pthread -o CMakeFiles/systemc.dir/sysc/communication/sc_signal_resolved_ports.cpp.o -c /home/sumit/install/systemc-2.3.2/src/sysc/communication/sc_signal_resolved_ports.cpp .......... Regards, Sumit Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted May 26, 2018 Report Share Posted May 26, 2018 Hello @sumit_tuwien, You can turn off the G++ extensions using the CMake command-line option: # Enable C++11 compilation flag # -DCMAKE_CXX_STANDARD=11 # Disable C++ Compiler Extensions # -DCMAKE_CXX_EXTENSIONS=OFF cmake -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_INSTALL_PREFIX=<Path to install location> .. You can find a reference here. Can you also list the version and platform information of the tools you are using (clang, CMake, etc.)? Hope it helps. Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
sumit_tuwien Posted May 26, 2018 Author Report Share Posted May 26, 2018 Hello Ameya, Thanks for the help. Regards, Sumit Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.