Hello,
I am using icpc compiler on both windows (visual studio 2012) and linux (which has g++ 4.8.2 installed). I am running into issues with porting the code from one OS to another. Code that compiles on windows without any major modifications, fails to compile of linux (having me make significant changes, especially at places where I am working with templates, specialized templates and template inheritance) , so I tried comparing compiler switches/triggers generated by windows(in VS2012 ) and the one that I provide in my cmake (CMakeLists.txt) but none of my combination seem to help.
e.g
Following is command line (generated by VS2012) on windows
/GS /W3 /Zc:wchar_t /I"C:\Program Files (x86)\Intel\Composer XE\tbb\include" /I"..\..\..\..\ThirdParty\boost\boost_1_55_0" /Zi /Od /Fd"C:\SomeDir\msvs\obj\Debug\vc110.pdb" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "TBB_USE_DEBUG" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /Qstd=c++0x /WX /Zc:forScope /arch:SSE3 /Gd /Oi /MDd /Fa"C:\SomeDir\msvs\obj\Debug\" /EHa /nologo /Fo"C:\SomeDir\msvs\obj\Debug\" /Fp"C:\SomeDir\msvs\obj\Debug\FilterDemo.pch"
Following is what I have tried in linux (in my CMakeLists.txt)
set(CMAKE_CXX_FLAGS " -w3 -std=c++11")
set(CMAKE_CXX_FLAGS " -W -Werror -Wall -std=c++11")
set(CMAKE_CXX_FLAGS " -W -Werror -std=c++11")
Can anyone kindly help me with this porting issue, specifically, could you please advise what common compiler flags are supposed to be set on windows and linux for the ease of porting the code from one OS to another.
Thank you in advance.
Sincerely,
A