-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
45 lines (34 loc) · 1.05 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
43
44
45
cmake_minimum_required(VERSION 2.8)
project(ptex)
include(GNUInstallDirs)
include(CTest)
include(FindZLIB)
include(FindThreads)
enable_testing()
# Detect the build type from the $FLAVOR environment variable
if ("$ENV{FLAVOR}" MATCHES "debug")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE)
else ()
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE)
endif ()
if (NOT WIN32)
set(CMAKE_CXX_FLAGS "-std=c++98 -Wall -Wextra -pedantic")
endif ()
if(MSVC)
add_definitions(
#warning C4800: 'BOOL': forcing value to bool 'true' or 'false' (performance warning)
/wd4800
#warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
/wd4244
/D_CRT_SECURE_NO_WARNINGS
)
endif()
if (${PRMAN_15_COMPATIBLE_PTEX})
add_definitions(-DPTEX_NO_LARGE_METADATA_BLOCKS)
endif ()
include_directories(src/ptex)
include_directories(${ZLIB_INCLUDE_DIR})
add_subdirectory(src/ptex)
add_subdirectory(src/utils)
add_subdirectory(src/tests)
add_subdirectory(src/doc)