From bdb2d721edcdf97fefafe86ba8ba76c02c5eaa30 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 13 Nov 2012 16:07:52 +0100 Subject: [PATCH] Included DEFINE_UNIX switch for CMake in order to set necessary define for STLSoft (on Mac OS X). --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10f1833fc..06b47443a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,9 @@ project (MRMC-cpp CXX C) # The version number. set (MRMC_CPP_VERSION_MAJOR 1) set (MRMC_CPP_VERSION_MINOR 0) - + +option(DEFINE_UNIX "Defines the UNIX flag for compilation." OFF) + #Configurations for GCC if(CMAKE_COMPILER_IS_GNUCC) set(MRMC_GCC_NO_DEBUG_SYMBOLS OFF CACHE BOOL "Whether debug symbols should be included in MRMC with GCC, set ON for better performance") @@ -173,4 +175,8 @@ if (THREADS_FOUND) include_directories(${THREADS_INCLUDE_DIRS}) target_link_libraries (MRMC-tests ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries (MRMC-cpp ${CMAKE_THREAD_LIBS_INIT}) -endif(THREADS_FOUND) \ No newline at end of file +endif(THREADS_FOUND) + +if (DEFINE_UNIX) + add_definitions(-DUNIX) +endif(DEFINE_UNIX) \ No newline at end of file