Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable the SSE/SSE2 instruction set in Visual Studio 2008 (using CMake)?

In Visual Studio 2005 I went in:

View --> Property Pages --> C/C++ --> Code Generation --> Enable Enhanced Instruction Set

But in Visual Studio 2008?

Thanks in advance

like image 554
Angelo Avatar asked Sep 26 '09 10:09

Angelo


3 Answers

If you're looking for SSE/SSE2: Project > Properties > Configuration Properties > C/C++ > Code Generation > Enable Enhanced Instruction Set, or append /arch:SSE (or /arch:SSE2) in Command Line > Additional Options.

You need to have a native project, and at least one .cpp file added to access this, though.

like image 160
Cat Plus Plus Avatar answered Oct 21 '22 23:10

Cat Plus Plus


Using CMake you could add the following to CMakeLists.txt:

IF(MSVC)
   ADD_DEFINITIONS(/arch:SSE)
ENDIF(MSVC)

or /arch:SSE2.

like image 14
larsmoa Avatar answered Oct 21 '22 23:10

larsmoa


It is Project->Properties... (same path as above)

like image 1
Naveen Avatar answered Oct 21 '22 21:10

Naveen