Files
EPANET/tools/epanet-output/CMakeLists.txt
Michael Tryby bbe40c5ba4 Feature unittest (#157)
* Adding support for unit testing using boost unit test and ctest

* Adding libboost-test to Travis config.

* Adding libboost-test to Travis config.

* Modifying per element comparison

* Modifying per element comparison

* Fixing typo

* Fixing typo

* Adding custom comparison for strings

* Updating Travis to run unit tests

* Updating Travis to run unit tests

* Fixing typo

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor and Travis

* Preparing unit testing to run on Appveyor and Travis

* Preparing unit testing to run on Appveyor and Travis

* Preparing unit testing to run on Appveyor

* Preparing unit testing to run on Appveyor

* Fixing unit testing path issue in CMake

* Fixing unit testing path issue in CMake

* Fixing bugs in cmake and appveyor scripts

* Rolling back generate_export_header in cmake
2018-03-21 14:10:10 -04:00

41 lines
1.2 KiB
CMake

#
# CMakeLists.txt - CMake configuration file for epanet-output library
#
# Created: March 9, 2018
# Author: Michael E. Tryby
# US EPA ORD/NRMRL
#
cmake_minimum_required (VERSION 3.0)
# Sets for output directory for executables and libraries.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# configure file groups
set(EPANET_OUT_SOURCES src/epanet_output.c src/errormanager.c)
# the binary output file API
add_library(epanet-output SHARED ${EPANET_OUT_SOURCES})
target_include_directories(epanet-output PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
include(GenerateExportHeader)
generate_export_header(epanet-output
BASE_NAME epanet_output
EXPORT_MACRO_NAME DLLEXPORT
EXPORT_FILE_NAME epanet_output_export.h
STATIC_DEFINE SHARED_EXPORTS_BUILT_AS_STATIC)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/epanet_output_export.h DESTINATION
${CMAKE_CURRENT_SOURCE_DIR}/include)