2015-03-03 00:38:33 +08:00
|
|
|
#############################################################################
|
2015-06-10 22:18:59 +08:00
|
|
|
## gmio
|
2015-05-01 00:19:45 +08:00
|
|
|
## Copyright Fougue (2 Mar. 2015)
|
2015-03-03 00:38:33 +08:00
|
|
|
## contact@fougsys.fr
|
|
|
|
##
|
|
|
|
## This software is a reusable library whose purpose is to provide complete
|
|
|
|
## I/O support for various CAD file formats (eg. STL)
|
|
|
|
##
|
|
|
|
## This software is governed by the CeCILL-B license under French law and
|
|
|
|
## abiding by the rules of distribution of free software. You can use,
|
|
|
|
## modify and/ or redistribute the software under the terms of the CeCILL-B
|
|
|
|
## license as circulated by CEA, CNRS and INRIA at the following URL
|
2015-03-30 15:05:25 +08:00
|
|
|
## "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html".
|
2015-03-03 00:38:33 +08:00
|
|
|
#############################################################################
|
|
|
|
|
2015-03-30 22:37:47 +08:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
2014-01-24 00:24:50 +08:00
|
|
|
|
2013-02-21 21:37:42 +08:00
|
|
|
include(CheckIncludeFiles)
|
2014-01-24 00:24:50 +08:00
|
|
|
include(CheckFunctionExists)
|
|
|
|
include(CheckCSourceCompiles)
|
2015-04-03 21:22:47 +08:00
|
|
|
include(CheckTypeSize)
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2014-03-28 23:33:35 +08:00
|
|
|
project(gmio C)
|
2015-05-28 00:57:00 +08:00
|
|
|
set(GMIO_VERSION_MAJOR 0)
|
|
|
|
set(GMIO_VERSION_MINOR 1)
|
|
|
|
set(GMIO_VERSION_PATCH 0)
|
|
|
|
set(GMIO_VERSION
|
|
|
|
${GMIO_VERSION_MAJOR}.${GMIO_VERSION_MINOR}.${GMIO_VERSION_PATCH})
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2014-03-14 00:49:39 +08:00
|
|
|
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
2014-02-19 19:13:28 +08:00
|
|
|
|
2014-01-22 01:28:29 +08:00
|
|
|
# Options
|
2015-04-01 21:44:03 +08:00
|
|
|
option(BUILD_SHARED_LIBS "Build shared libraries (DLL)" OFF)
|
2015-04-01 21:39:00 +08:00
|
|
|
option(BUILD_STRICT_C90 "Build with strict conformance to C90 standard" OFF)
|
2014-11-19 16:38:24 +08:00
|
|
|
option(BUILD_WITH_LIBSTL "Build the libSTL module" ON)
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2013-03-06 17:31:21 +08:00
|
|
|
# Add core source files
|
2014-03-28 23:33:35 +08:00
|
|
|
file(GLOB ALL_SRC_FILES src/gmio_core/* src/gmio_core/internal/*)
|
2014-01-29 02:00:36 +08:00
|
|
|
set(ALL_SRC_FILES ${ALL_SRC_FILES})
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2015-03-04 00:18:15 +08:00
|
|
|
# Find bit size of the target architecture
|
2015-03-03 17:27:39 +08:00
|
|
|
math(EXPR GMIO_TARGET_ARCH_BIT_SIZE "8 * ${CMAKE_SIZEOF_VOID_P}")
|
|
|
|
|
2015-03-20 15:53:20 +08:00
|
|
|
# Test if host's architecture is big-endian
|
|
|
|
include(TestBigEndian)
|
|
|
|
test_big_endian(GMIO_HOST_IS_BIG_ENDIAN)
|
|
|
|
|
2015-04-01 21:39:00 +08:00
|
|
|
# Adapt C compiler flags to satisfy the BUILD_STRICT_C90 option
|
|
|
|
# It must be done before checking of C99 and POSIX features
|
|
|
|
if(BUILD_STRICT_C90)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
2015-04-02 15:38:08 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi -pedantic-errors")
|
2015-04-01 21:39:00 +08:00
|
|
|
elseif(MSVC)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Za")
|
|
|
|
endif()
|
|
|
|
endif()
|
2014-01-24 00:24:50 +08:00
|
|
|
|
2015-04-01 21:39:00 +08:00
|
|
|
set(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS}")
|
2014-11-11 01:31:44 +08:00
|
|
|
|
2015-04-01 21:39:00 +08:00
|
|
|
# Some compilers (like GCC v4.9) don't disable <stdint.h> in STRICT_ANSI mode
|
|
|
|
check_include_files(stdint.h GMIO_HAVE_STDINT_H)
|
2015-03-26 19:04:17 +08:00
|
|
|
|
2015-04-02 15:38:08 +08:00
|
|
|
# Check non-ANSI available features
|
2015-04-01 21:39:00 +08:00
|
|
|
if(NOT BUILD_STRICT_C90)
|
2015-04-02 15:38:08 +08:00
|
|
|
# Check C99 features
|
2015-04-01 21:39:00 +08:00
|
|
|
check_function_exists(strtof GMIO_HAVE_STRTOF_FUNC)
|
2015-04-04 05:58:58 +08:00
|
|
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
list(APPEND CMAKE_REQUIRED_LIBRARIES m) # -lm
|
|
|
|
endif()
|
2015-04-01 21:39:00 +08:00
|
|
|
check_function_exists(powf GMIO_HAVE_POWF_FUNC)
|
2015-04-04 05:58:58 +08:00
|
|
|
set(CMAKE_REQUIRED_LIBRARIES)
|
|
|
|
|
2015-04-01 21:39:00 +08:00
|
|
|
check_include_files(stdbool.h GMIO_HAVE_STDBOOL_H)
|
2015-03-30 22:37:47 +08:00
|
|
|
|
2015-04-02 15:38:08 +08:00
|
|
|
# Check POSIX features
|
2015-04-03 21:12:58 +08:00
|
|
|
if(UNIX)
|
|
|
|
# See:
|
2015-04-04 05:51:32 +08:00
|
|
|
# http://linux.die.net/man/2/fstat64
|
|
|
|
# https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/fstat.2.html
|
|
|
|
# https://www.gnu.org/software/libc/manual/html_mono/libc.html#Feature-Test-Macros
|
2015-04-03 21:12:58 +08:00
|
|
|
if(APPLE)
|
|
|
|
add_definitions(-D_DARWIN_USE_64_BIT_INODE)
|
2015-04-04 05:51:32 +08:00
|
|
|
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_DARWIN_USE_64_BIT_INODE)
|
2015-04-03 21:12:58 +08:00
|
|
|
else()
|
2015-04-04 05:51:32 +08:00
|
|
|
add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1)
|
|
|
|
list(APPEND CMAKE_REQUIRED_DEFINITIONS
|
|
|
|
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1)
|
2015-04-03 21:12:58 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2015-04-02 15:38:08 +08:00
|
|
|
check_include_files(sys/types.h GMIO_HAVE_SYS_TYPES_H)
|
|
|
|
check_include_files(sys/stat.h GMIO_HAVE_SYS_STAT_H)
|
|
|
|
check_function_exists(fileno GMIO_HAVE_POSIX_FILENO_FUNC)
|
2015-04-04 05:51:32 +08:00
|
|
|
# Have fstat64() ?
|
2015-04-03 21:12:58 +08:00
|
|
|
check_c_source_compiles(
|
|
|
|
"#include <sys/stat.h>
|
|
|
|
int main() { fstat64(0, NULL); return 0; }"
|
|
|
|
GMIO_HAVE_POSIX_FSTAT64_FUNC)
|
2015-04-02 15:38:08 +08:00
|
|
|
if(WIN32)
|
|
|
|
check_function_exists(_fstat64 GMIO_HAVE_WIN__FSTAT64_FUNC)
|
|
|
|
endif()
|
|
|
|
|
2015-04-04 05:51:32 +08:00
|
|
|
# Check size(in bytes) of stat::st_size
|
2015-04-03 21:12:58 +08:00
|
|
|
set(CMAKE_EXTRA_INCLUDE_FILES sys/stat.h)
|
|
|
|
if(GMIO_HAVE_WIN__FSTAT64_FUNC)
|
|
|
|
check_type_size("((struct _stat64*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
2015-04-03 21:22:47 +08:00
|
|
|
elseif(GMIO_HAVE_POSIX_FSTAT64_FUNC)
|
2015-04-03 21:12:58 +08:00
|
|
|
check_type_size("((struct stat64*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
|
|
|
else()
|
|
|
|
check_type_size("((struct stat*)0)->st_size" GMIO_SIZEOF_STRUCT_STAT_ST_SIZE)
|
|
|
|
endif()
|
|
|
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
2015-04-04 05:51:32 +08:00
|
|
|
set(CMAKE_REQUIRED_DEFINITIONS)
|
2015-04-01 21:39:00 +08:00
|
|
|
|
2015-04-04 05:51:32 +08:00
|
|
|
# Verify large file support
|
2015-04-03 21:12:58 +08:00
|
|
|
if(GMIO_HAVE_SYS_STAT_H
|
|
|
|
AND NOT(GMIO_SIZEOF_STRUCT_STAT_ST_SIZE STREQUAL "0") # Not arch-dependent size
|
|
|
|
AND NOT(GMIO_SIZEOF_STRUCT_STAT_ST_SIZE EQUAL 8))
|
|
|
|
message(WARNING "<sys/stat.h> does not provide 64b variant of fstat(), you may encounter problems with files > 2GB")
|
2015-04-02 15:38:08 +08:00
|
|
|
endif()
|
2015-03-30 22:37:47 +08:00
|
|
|
|
2015-04-02 15:38:08 +08:00
|
|
|
# Have builtin byte swap functions ?
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
# __builtin_bswap16() is missing in x86 GCC version prior to v4.7
|
|
|
|
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624
|
|
|
|
check_c_source_compiles(
|
|
|
|
"int main() { return (int)__builtin_bswap16(0x1122); }"
|
|
|
|
GMIO_HAVE_GCC_BUILTIN_BSWAP16_FUNC)
|
|
|
|
check_c_source_compiles(
|
|
|
|
"int main() { return (int)__builtin_bswap32(0x11223344); }"
|
|
|
|
GMIO_HAVE_GCC_BUILTIN_BSWAP32_FUNC)
|
|
|
|
elseif(MSVC)
|
|
|
|
check_c_source_compiles(
|
|
|
|
"#include <stdlib.h>
|
|
|
|
int main() { return (int)_byteswap_ulong(0x11223344); }"
|
|
|
|
GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC)
|
|
|
|
endif()
|
|
|
|
endif() # !BUILD_STRICT_C90
|
2014-01-24 00:24:50 +08:00
|
|
|
|
2015-05-28 00:57:00 +08:00
|
|
|
configure_file(src/gmio_core/version.h.cmake version.h @ONLY)
|
2014-03-28 23:33:35 +08:00
|
|
|
configure_file(src/gmio_core/config.h.cmake config.h @ONLY)
|
2015-05-28 00:57:00 +08:00
|
|
|
include_directories(${CMAKE_BINARY_DIR}) # For generated header files
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2014-02-19 19:13:28 +08:00
|
|
|
# Specific flags for GCC
|
2013-02-21 21:37:42 +08:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
2015-04-02 15:38:08 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstrict-aliasing")
|
2015-04-10 21:10:33 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wstrict-aliasing")
|
2015-04-03 17:15:57 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align -Wlogical-op -Wfloat-equal")
|
2015-04-10 21:10:33 +08:00
|
|
|
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Winline")
|
|
|
|
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-field-initializers")
|
2015-04-03 17:15:57 +08:00
|
|
|
|
|
|
|
# Disable some warnings
|
2015-04-10 21:10:33 +08:00
|
|
|
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces -Wno-missing-field-initializers")
|
2015-03-04 00:18:15 +08:00
|
|
|
|
2014-11-19 16:38:24 +08:00
|
|
|
# Force PIC for GCC, see : https://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
2013-02-21 21:37:42 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Specific flags for Visual C++
|
|
|
|
if(MSVC)
|
2015-03-03 23:27:02 +08:00
|
|
|
# Treat all files a C source files
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TC")
|
2015-03-04 00:18:15 +08:00
|
|
|
|
2015-03-03 23:27:02 +08:00
|
|
|
# Set warning level to /W4
|
|
|
|
string(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
2015-03-18 23:27:43 +08:00
|
|
|
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /analyze")
|
2015-03-04 00:18:15 +08:00
|
|
|
|
2015-03-13 18:05:51 +08:00
|
|
|
# Treat warnings as errors
|
2015-04-10 21:10:33 +08:00
|
|
|
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
|
2015-03-13 18:05:51 +08:00
|
|
|
|
2015-03-03 23:27:02 +08:00
|
|
|
# Enable /Zc:strictStrings when msvc_ver > 2012 and build_type != Debug
|
|
|
|
if((MSVC_VERSION GREATER 1700) AND NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zc:strictStrings")
|
|
|
|
endif()
|
2015-03-04 00:18:15 +08:00
|
|
|
|
|
|
|
# Disable deprecation warnings about "non-secure" CRT functions
|
2015-03-26 19:05:13 +08:00
|
|
|
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
|
2015-05-28 00:57:00 +08:00
|
|
|
|
|
|
|
# Enable "Generate Intrinsic Functions"
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Oi")
|
2013-02-21 21:37:42 +08:00
|
|
|
endif()
|
|
|
|
|
2015-03-04 00:18:15 +08:00
|
|
|
# Enable DLL generation (export symbols)
|
2013-02-21 21:37:42 +08:00
|
|
|
if(BUILD_SHARED_LIBS)
|
2014-11-19 16:38:24 +08:00
|
|
|
add_definitions(-DGMIO_LIB_DLL
|
|
|
|
-DGMIO_LIB_MAKE_DLL)
|
2015-05-28 00:57:00 +08:00
|
|
|
if(MSVC)
|
|
|
|
configure_file(src/gmio_core/gmio.rc.cmake gmio.rc @ONLY)
|
|
|
|
set(ALL_SRC_FILES ${ALL_SRC_FILES} ${CMAKE_BINARY_DIR}/gmio.rc)
|
|
|
|
endif()
|
2013-02-21 21:37:42 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Declare installs
|
2015-05-28 00:57:00 +08:00
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/version.h DESTINATION include/gmio_core)
|
2014-03-28 23:33:35 +08:00
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/config.h DESTINATION include/gmio_core)
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2014-03-28 23:33:35 +08:00
|
|
|
file(GLOB C_CORE_HEADERS src/gmio_core/*.h)
|
|
|
|
install(FILES ${C_CORE_HEADERS} DESTINATION include/gmio_core)
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2013-03-06 17:31:21 +08:00
|
|
|
# Module libSTL
|
2014-01-24 00:24:50 +08:00
|
|
|
if(BUILD_WITH_LIBSTL)
|
2014-11-19 16:38:24 +08:00
|
|
|
if(BUILD_SHARED_LIBS)
|
|
|
|
add_definitions(-DGMIO_LIBSTL_DLL
|
|
|
|
-DGMIO_LIBSTL_MAKE_DLL)
|
|
|
|
endif()
|
2013-03-06 17:31:21 +08:00
|
|
|
|
2014-11-19 16:38:24 +08:00
|
|
|
file(GLOB ALL_LIBSTL_SRC_FILES src/gmio_stl/* src/gmio_stl/internal/*)
|
|
|
|
set(ALL_SRC_FILES ${ALL_SRC_FILES} ${ALL_LIBSTL_SRC_FILES})
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2014-01-22 01:28:29 +08:00
|
|
|
endif()
|
2014-03-28 23:33:35 +08:00
|
|
|
file(GLOB C_LIBSTL_HEADERS src/gmio_stl/*.h)
|
|
|
|
install(FILES ${C_LIBSTL_HEADERS} DESTINATION include/gmio_stl)
|
2014-01-22 01:28:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Common for support modules
|
2014-03-28 23:33:35 +08:00
|
|
|
install(FILES src/gmio_support/support_global.h DESTINATION include/gmio_support)
|
2014-01-22 01:28:29 +08:00
|
|
|
|
|
|
|
# Qt support
|
2015-04-02 16:27:51 +08:00
|
|
|
install(FILES src/gmio_support/stream_qt.h DESTINATION include/gmio_support)
|
|
|
|
install(FILES src/gmio_support/stream_qt.cpp DESTINATION src/gmio_support)
|
2014-01-22 01:28:29 +08:00
|
|
|
|
|
|
|
# OpenCASCADE support
|
2015-04-02 16:27:51 +08:00
|
|
|
install(FILES src/gmio_support/stl_occ.h DESTINATION include/gmio_support)
|
|
|
|
install(FILES src/gmio_support/stl_occ.cpp DESTINATION src/gmio_support)
|
2013-03-06 17:31:21 +08:00
|
|
|
|
2014-02-19 19:13:28 +08:00
|
|
|
# Installs for target
|
2014-03-28 23:33:35 +08:00
|
|
|
add_library(gmio ${ALL_SRC_FILES})
|
|
|
|
install(TARGETS gmio
|
2013-02-21 21:37:42 +08:00
|
|
|
RUNTIME DESTINATION lib
|
|
|
|
LIBRARY DESTINATION lib
|
2013-03-06 17:31:21 +08:00
|
|
|
ARCHIVE DESTINATION lib)
|
2013-02-21 21:37:42 +08:00
|
|
|
|
2015-05-28 15:36:24 +08:00
|
|
|
# Add a target to generate API documentation with Doxygen
|
|
|
|
find_package(Doxygen)
|
|
|
|
if(DOXYGEN_FOUND)
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.cmake
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
|
|
|
|
add_custom_target(
|
|
|
|
doc
|
|
|
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
|
|
|
COMMENT "Generating API documentation with Doxygen" VERBATIM)
|
|
|
|
endif(DOXYGEN_FOUND)
|
|
|
|
|
2013-02-21 21:37:42 +08:00
|
|
|
# Examples:
|
|
|
|
# cmake ../.. -DCMAKE_INSTALL_PREFIX=../../gcc-linux64 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_POSTFIX=.debug
|
|
|
|
# cmake ../.. -DCMAKE_INSTALL_PREFIX=../../gcc-linux64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_RELEASE_POSTFIX=.release
|
|
|
|
# make VERBOSE=1 or cmake -DCMAKE_VERBOSE_MAKEFILE=TRUE
|
2014-01-30 07:26:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Tests
|
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
set(CMAKE_CTEST_COMMAND ctest -V)
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
|
|
|
|
|
2015-05-28 23:33:42 +08:00
|
|
|
add_executable(
|
|
|
|
test_internal
|
|
|
|
EXCLUDE_FROM_ALL
|
|
|
|
tests/stream_buffer.c
|
|
|
|
tests/utils.c
|
|
|
|
tests/test_internal.c
|
|
|
|
src/gmio_core/stream.c
|
|
|
|
src/gmio_core/internal/string_parse.c)
|
|
|
|
|
|
|
|
add_executable(
|
|
|
|
test_platform EXCLUDE_FROM_ALL tests/test_platform.c)
|
|
|
|
|
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/tests/models
|
|
|
|
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/tests)
|
|
|
|
add_executable(
|
|
|
|
test_stl
|
|
|
|
EXCLUDE_FROM_ALL
|
|
|
|
tests/test_stl_io.c
|
|
|
|
src/gmio_core/buffer.c
|
|
|
|
src/gmio_core/stream.c
|
|
|
|
src/gmio_core/internal/string_parse.c
|
|
|
|
src/gmio_stl/stl_format.c
|
|
|
|
src/gmio_stl/stl_io.c
|
|
|
|
src/gmio_stl/stla_read.c
|
|
|
|
src/gmio_stl/stlb_read.c
|
|
|
|
src/gmio_stl/internal/stl_rw_common.c
|
|
|
|
src/gmio_stl/internal/stla_write.c
|
|
|
|
src/gmio_stl/internal/stlb_byte_swap.c
|
|
|
|
src/gmio_stl/internal/stlb_write.c)
|
2014-11-19 16:38:24 +08:00
|
|
|
|
2015-04-10 00:02:31 +08:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
target_link_libraries(test_internal m) # -lm
|
|
|
|
endif()
|
|
|
|
|
2014-01-30 07:26:30 +08:00
|
|
|
add_test(test_internal test_internal)
|
2014-02-11 18:13:15 +08:00
|
|
|
add_test(test_platform test_platform)
|
2015-05-28 23:33:42 +08:00
|
|
|
add_test(test_stl test_stl)
|
2014-11-19 16:38:24 +08:00
|
|
|
|
2015-05-28 23:33:42 +08:00
|
|
|
add_dependencies(
|
|
|
|
check
|
|
|
|
test_internal
|
|
|
|
test_platform
|
|
|
|
test_stl)
|