forked from FAIRDataPipeline/cppSimpleModel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
52 lines (41 loc) · 1.74 KB
/
CMakeLists.txt
File metadata and controls
52 lines (41 loc) · 1.74 KB
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
cmake_minimum_required(VERSION 3.10)
# Disable Building in Debug as HD5
get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
IF(isMultiConfig)
set(CMAKE_CONFIGURATION_TYPES "Release" CACHE STRING "" FORCE)
MESSAGE("Multi-Config Generator found, please ensure you are building with a realease configuration")
ELSE()
if(NOT CMAKE_BUILD_TYPE)
message("Defaulting to release build.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
ENDIF()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY HELPSTRING "Choose the type of build")
# set the valid options for cmake-gui drop-down list
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release")
ENDIF()
if(NOT DEFINED CPPDATAPIPELINEREF)
SET(CPPDATAPIPELINEREF "tags/v0.2.1")
endif()
# set the project name
project(cppSimpleModel
VERSION 0.1.0
DESCRIPTION "C++ Simple Model for the FAIR Data Pipeline"
HOMEPAGE_URL "https://github.com/FAIRDataPipeline/cppSimpleModel"
LANGUAGES CXX C
)
set( CPPSIMPLEMODEL cppSimpleModel )
# Set Output Directories to avoid issues on multi release compilers
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Include External Project and GNUInstallDirs - For Installing Libries
INCLUDE( ExternalProject )
INCLUDE( GNUInstallDirs )
# Set C++ Standard to 17
SET( CMAKE_CXX_STANDARD 17 )
SET( CMAKE_CXX_STANDARD_REQUIRED ON )
# Set Include and Header Variables
SET( CPPSIMPLEMODEL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include )
SET( CPPSIMPLEMODEL_HEADER ${FDPAPI_INCLUDE_DIRS}/simpleModel.hxx )
# Add the src dirctory compiling it's CMakeLists.txt
ADD_SUBDIRECTORY( src )