-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
42 lines (36 loc) · 1.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
cmake_minimum_required(VERSION 2.8.6)
project(PSim)
find_package(OpenSim REQUIRED)
# CMAKE_BUILD_TYPE
# ----------------
if(NOT MSVC AND NOT XCODE AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif()
# We use C++11 language features.
# -------------------------------
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
"${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# Using C++11 on OSX requires using libc++ instead of libstd++.
# libc++ is an implementation of the C++ standard library
# for OSX.
if(APPLE)
if(XCODE)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
endif()
# Debug postfix.
# --------------
set(CMAKE_DEBUG_POSTFIX "_d")
add_subdirectory(doc)
add_subdirectory(PSim)
add_subdirectory(applications)
add_subdirectory(examples)
add_subdirectory(cmake)