[CMake] CMake on Solaris - 2 issues that I can't figure out
Dan Kegel
dank at kegel.com
Sat Dec 24 10:49:16 EST 2011
On Fri, Dec 23, 2011 at 1:00 PM, bmahf <bmahf at hotmail.com> wrote:
> 2) The decision was made to go ahead with the build, even though it was
> going to be creating statis libraries, and then we would go back and fix
> that later. So I ran gmake and get to a subproject where the __solaris__
> define that I had given didn't propagate.
>
> I have added the command "add_definitions(-D__solaris__)" to the .cmake
> files picked up by the main project and each of the subprojects. But when I
> put a "#ifdef __solaris__" followed by a #else, and put a #error in each of
> these blocks to give a message and abort, I always get the message saying
> that it didn't find __solaris__ as defined.
>
> Having put the add_definitions call in all projects throughout the solution,
> I am not sure what is going on here. Does anyone have a suggestion.
Switch to checking the symbol predefined by the compiler, maybe?
See http://sourceforge.net/apps/mediawiki/predef/index.php?title=Operating_Systems#Solaris
- Dan
More information about the CMake
mailing list