[CMake] Pre-processor flags issue
Enrique Izaguirre
enrique.izaguirre at gmail.com
Fri Mar 11 17:08:43 EST 2011
Hello friends,
I am trying to cross-compile an application from Windows to Linux. My
Toolchain file looks like this:
set(CMAKE_SYSTEM_NAME Linux)
#specify the cross-compiler
set (CMAKE_C_COMPILER /bin/gcc-linux)
set (CMAKE_CXX_COMPILER /bin/g++-linux)
The problem is that I have in my main CMakeLists.txt file the instruction
add_definitions ( ) with several flags I need to set for my application.
The problem is that the last flag I added ( a pre-processor flag) is working
fine on C compiler but causing a problem on C++ compiler.
My question is if can I move the add_definition( ) to the Toolchain file to
define a different set of flags for each compiler? Is it possible?
Thanks
Enrique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110311/40040fd2/attachment.htm>
More information about the CMake
mailing list