[CMake] Intel compilers

Tim Gallagher tim.gallagher at gatech.edu
Thu May 10 20:43:12 EDT 2012


Hi, 

If you do: 

CC=icc ccmake ../ 

it will work. Note this is all one line, without a semi-colon. 

As for the rest, I'll let somebody else answer. 

----- Original Message -----

From: "Mohammad Mirzadeh" <mirzadeh at gmail.com> 
To: cmake at cmake.org 
Sent: Thursday, May 10, 2012 8:21:23 PM 
Subject: [CMake] Intel compilers 


Hi, 


I have just started using CMake for my projects and have some problems getting it do exactly the things I want. So these are couple of questions I have: 


1) How can I change the compiler from GNU g++ to my preferred compiler, in this case intel's icc? I have tried CC=icc; ccmake ../ but that again defaults to g++ and picks up wrong compiler flags 


2) When I use the -ipo flag for icc, intel compiler complains that there are unresolved references whereas if I omit that, or just use g++, I don't have linking problems. Does the order of compilation (except main) matter when using target_link_libraries? 


3) How can I change from creating static libraries to just simply create object files and link to them? 


Thanks 




-- 

Powered by www.kitware.com 

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html 

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ 

Follow this link to subscribe/unsubscribe: 
http://www.cmake.org/mailman/listinfo/cmake 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120510/25c0bad8/attachment.htm>


More information about the CMake mailing list