-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
53 lines (44 loc) · 1.29 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
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_policy(SET CMP0048 NEW)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(PreventInSourceBuilds)
project(lmfit VERSION 8.2.2 LANGUAGES C)
option(FITTEST "Build with FitTest" OFF)
if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build as shared library" ON)
endif()
if(NOT DEFINED LIB_MAN)
option(LIB_MAN "Build library man pages" ON)
endif()
if(NOT DEFINED LIB_INSTALL)
option(LIB_INSTALL "Install library" ON)
endif()
set(CMAKE_C_STANDARD 99)
if(MSVC)
set(CTEST_CONFIGURATION_TYPE "${JOB_BUILD_CONFIGURATION}")
if(BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
else()
option(PEDANTIC "Compile with pedantic warnings" ON)
option(WERROR "Treat warnings as errors" OFF)
add_compile_options(-O3)
if(PEDANTIC)
add_compile_options(-pedantic -Wall)
endif()
if(WERROR)
add_compile_options(-Werror)
endif()
endif()
include(CTest)
add_subdirectory(lib)
add_subdirectory(demo)
if (LIB_MAN)
add_subdirectory(man)
endif()
if (FITTEST)
find_package(FitTest REQUIRED)
add_subdirectory(fittest)
endif()