2015-03-05 23:58:25 +01:00
|
|
|
cmake_minimum_required(VERSION 2.8.4)
|
|
|
|
project(monad_native)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
|
|
|
|
#include gtest
|
|
|
|
include_directories(../ext-src/gtest/fused-src impl)
|
2015-06-16 23:02:19 +02:00
|
|
|
link_directories(${monad_native_BINARY_DIR})
|
2015-03-05 23:58:25 +01:00
|
|
|
|
2015-06-16 23:02:19 +02:00
|
|
|
set(LIB_SOURCE_FILES impl/getcurrentprocessorid.cpp impl/getusername.cpp)
|
|
|
|
set(TEST_SOURCE_FILES tests/test-getcurrentprocessid.cpp)
|
|
|
|
set(SOURCE_FILES main.cpp ../ext-src/gtest/fused-src/gtest/gtest-all.cc)
|
2015-03-05 23:58:25 +01:00
|
|
|
|
2015-06-16 23:02:19 +02:00
|
|
|
add_library(ps SHARED ${LIB_SOURCE_FILES})
|
|
|
|
add_executable(monad_native ${SOURCE_FILES} ${TEST_SOURCE_FILES})
|
|
|
|
|
|
|
|
# add pthread and other libs
|
2015-03-05 23:58:25 +01:00
|
|
|
find_package(Threads)
|
2015-06-16 23:02:19 +02:00
|
|
|
target_link_libraries(monad_native ${CMAKE_THREAD_LIBS_INIT} ps)
|
2015-03-05 23:58:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|