> Thank you so much for the hint. Setting the environment variable CXX from > within my CMakeLists.txt via > SET(ENV{CXX} "icpc") > but before any call to project() or enable_language() seems indeed to do > the trick. > > Setting CMAKE_CXX_FLAGS_RELEASE or CMAKE_CXX_FLAGS_DEBUG at this stage > however does not work. This apparently needs to go after the project() > statement. > I could of course set the environment cxx-flags in the same way as above. > This would somewhat sacrifice the nice RELEASE / DEBUG distinction but > maybe this can be done by some if-statements (there certainly is a way to > query the CMAKE_BUILD_TYPE variable, right?).
if (CMAKE_BUILD_TYPE STREQUAL Debug) ... But noone stops you to put another if(Intel) behind the project() call to finish what you began before the project(). Eike -- 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