2011/4/25 AJ ONeal <coola...@gmail.com>: > What's the preferred solution to the OS X getline problem (meaning that it > doesn't exist in OS X's libc) when using CMake? > ("Don't use getline" isn't an option)
I don't think this is a CMake question. If you need getline on OS X then may be you'll have to provide an implementation when you are compiling on OS X? see: http://stackoverflow.com/questions/1117108/compiling-c-code-using-gnu-c-getline-on-mac-osx > This is my first time I've tried to compile my Linux code on OS X, so I > don't know anything about how to specify the "do this with os xyz and do > this with os abc" options. In a CMakeLists.txt one usually do something like: IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") list(APPEND SOURCES mygetline.c) endif() Have a look at the Wiki entries too: http://www.cmake.org/Wiki/CMake#Basic_Introductions http://www.cmake.org/Wiki/CMake_HowToDoPlatformChecks -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ 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