Compare commits
345
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81b798e34a | ||
|
|
5aad260470 | ||
|
|
f4a0feb33a | ||
|
|
4527aadff6 | ||
|
|
1c12e5d102 | ||
|
|
278e45caa7 | ||
|
|
a9c64bc448 | ||
|
|
261ae1d67e | ||
|
|
1d34753c03 | ||
|
|
aa97040c83 | ||
|
|
c2b87f8f0b | ||
|
|
1a32be9308 | ||
|
|
52bb54d87b | ||
|
|
f9390c6f8c | ||
|
|
e421f70ce0 | ||
|
|
767a01a8f0 | ||
|
|
5af38feaa7 | ||
|
|
2067e48bbd | ||
|
|
883bc716ce | ||
|
|
89f8807c6e | ||
|
|
6c76d7b184 | ||
|
|
1e18361351 | ||
|
|
0bea3efca0 | ||
|
|
225180f35d | ||
|
|
6f60a8a7f9 | ||
|
|
910faf0198 | ||
|
|
dd6ef88aa1 | ||
|
|
6b1ba4aa5d | ||
|
|
5aca33785c | ||
|
|
a1d6b25e75 | ||
|
|
626bb73cb9 | ||
|
|
8a2665e980 | ||
|
|
4740f4d45c | ||
|
|
04f4c1da66 | ||
|
|
0a12237f8b | ||
|
|
c77471a5f8 | ||
|
|
a9173c8b41 | ||
|
|
521f4427ea | ||
|
|
7628642baf | ||
|
|
c446fc391b | ||
|
|
473223d831 | ||
|
|
b4cf4236f2 | ||
|
|
52635e7d8b | ||
|
|
6817e1b868 | ||
|
|
a72fa6eb86 | ||
|
|
a86b035dc7 | ||
|
|
7425e55db7 | ||
|
|
905254125e | ||
|
|
db31ea0455 | ||
|
|
7b54e23e1a | ||
|
|
c676850fab | ||
|
|
b507ee8179 | ||
|
|
347df4f231 | ||
|
|
00ad279a63 | ||
|
|
0878a6d359 | ||
|
|
77ab82b571 | ||
|
|
0a954f1976 | ||
|
|
75706a942a | ||
|
|
d8d293bbf8 | ||
|
|
3be42207ee | ||
|
|
b49d2beb6a | ||
|
|
245ff1458b | ||
|
|
010e02b7a6 | ||
|
|
c84330b26a | ||
|
|
88e09ca813 | ||
|
|
ee13cdaca3 | ||
|
|
b60f85be1d | ||
|
|
f7cde9fc20 | ||
|
|
3010afa7ea | ||
|
|
f5d0cc59aa | ||
|
|
bd320c403d | ||
|
|
e83fc64bc9 | ||
|
|
0e9cc5c6ae | ||
|
|
a215cae560 | ||
|
|
6c708845bf | ||
|
|
2e1befa0bf | ||
|
|
884949bbab | ||
|
|
ea7adb4d18 | ||
|
|
6ada55b7fe | ||
|
|
f705842bb7 | ||
|
|
c1636b4d01 | ||
|
|
0c424b4eb5 | ||
|
|
dea7f8c3a1 | ||
|
|
16e3749b8f | ||
|
|
3953a2268e | ||
|
|
5f1465e4e6 | ||
|
|
f3eab5d91a | ||
|
|
7f588a64cf | ||
|
|
38d2a49967 | ||
|
|
89035cdb2c | ||
|
|
16743b297b | ||
|
|
7ec9f7d8fb | ||
|
|
4e0d73d001 | ||
|
|
7ce8bcbefb | ||
|
|
4d6d249dad | ||
|
|
82c84e7337 | ||
|
|
4d68ec0b19 | ||
|
|
69e0813cf7 | ||
|
|
d0e2c156a1 | ||
|
|
b84921e9d8 | ||
|
|
d3418ed48c | ||
|
|
96f5f28058 | ||
|
|
ca155ce50d | ||
|
|
1bbbc219ba | ||
|
|
59cf7ec1ed | ||
|
|
f053df82db | ||
|
|
8cad6ec2aa | ||
|
|
5f345c700e | ||
|
|
37594fc4a2 | ||
|
|
d6da97ec30 | ||
|
|
5f88f509b2 | ||
|
|
d87d07a26c | ||
|
|
50b9032d32 | ||
|
|
d56795946c | ||
|
|
117ba3972f | ||
|
|
8595a291cb | ||
|
|
ee78ba9c52 | ||
|
|
575c77dda9 | ||
|
|
bd9942dc36 | ||
|
|
10999e7a48 | ||
|
|
becb8405ba | ||
|
|
dca5e0c843 | ||
|
|
47ecd2088f | ||
|
|
1cc2774b52 | ||
|
|
f12e16b3a7 | ||
|
|
ee689a10e1 | ||
|
|
3fd222218f | ||
|
|
212c11453e | ||
|
|
92d83ef14a | ||
|
|
950407a067 | ||
|
|
fb79eb2183 | ||
|
|
572e9adc0b | ||
|
|
ac702af7f3 | ||
|
|
c316f21fe6 | ||
|
|
14926414c3 | ||
|
|
260fd55f10 | ||
|
|
d94a44944b | ||
|
|
2be1cc40be | ||
|
|
809e1dd495 | ||
|
|
3aee5f353c | ||
|
|
6e6fb8197c | ||
|
|
235b1e6ca3 | ||
|
|
e99240a780 | ||
|
|
ca0824dd0d | ||
|
|
5dc04396ad | ||
|
|
3e8c11661d | ||
|
|
a63ac738af | ||
|
|
7a6ba24f81 | ||
|
|
1481950409 | ||
|
|
0073b386ef | ||
|
|
2d7ed17697 | ||
|
|
ffdeac2552 | ||
|
|
8dcfec46c9 | ||
|
|
14985062f7 | ||
|
|
e9e576e4f8 | ||
|
|
fad0cf4b3d | ||
|
|
4cd7e7c806 | ||
|
|
22cbb3efcf | ||
|
|
c415e49894 | ||
|
|
064a2b41b5 | ||
|
|
fffaba61f2 | ||
|
|
4ab01a7773 | ||
|
|
873a86de8b | ||
|
|
3a9fa997b3 | ||
|
|
2d26da7d24 | ||
|
|
c0c423c625 | ||
|
|
555a574eef | ||
|
|
82898d74a4 | ||
|
|
09f347234b | ||
|
|
3ce06bce27 | ||
|
|
e7d3c2a075 | ||
|
|
e1b374a7d6 | ||
|
|
33c66b0954 | ||
|
|
eb61193bcf | ||
|
|
2535a4f8b2 | ||
|
|
ed76f0b625 | ||
|
|
f3a82debec | ||
|
|
1da31f6501 | ||
|
|
67f8897429 | ||
|
|
81b82cdd24 | ||
|
|
28a988854f | ||
|
|
e36a1a69bd | ||
|
|
defd675944 | ||
|
|
ec97362602 | ||
|
|
586b8f8996 | ||
|
|
c1b57435b2 | ||
|
|
2b0da3fd41 | ||
|
|
15f9c40c54 | ||
|
|
0aa9b5dd97 | ||
|
|
97ef6d97ed | ||
|
|
d0293fd0c7 | ||
|
|
355f08f50e | ||
|
|
f688f2a0c9 | ||
|
|
07ed8f6968 | ||
|
|
993167ede1 | ||
|
|
870edbffa8 | ||
|
|
0f3b6262cd | ||
|
|
03fd892382 | ||
|
|
7712b9bb23 | ||
|
|
dcdd77a49d | ||
|
|
166425a9b8 | ||
|
|
ca4940e6e9 | ||
|
|
3156ea7fb6 | ||
|
|
2179c8a83b | ||
|
|
80208dcdd6 | ||
|
|
737c53ef28 | ||
|
|
ae9dbbd70e | ||
|
|
4ddce869b2 | ||
|
|
3bff65bc9b | ||
|
|
81dc369b03 | ||
|
|
388901d20c | ||
|
|
90dc1d6592 | ||
|
|
d0a425f403 | ||
|
|
2647e16a53 | ||
|
|
0869e41b28 | ||
|
|
5e9dfd7e94 | ||
|
|
dc302ea085 | ||
|
|
c771b270f3 | ||
|
|
5c8c5aaca6 | ||
|
|
2e01a01bf5 | ||
|
|
0705c500a5 | ||
|
|
c409145b25 | ||
|
|
457d51e303 | ||
|
|
69acdf329d | ||
|
|
c3f9ff563f | ||
|
|
d6b1570894 | ||
|
|
f853b997d7 | ||
|
|
ba12196a88 | ||
|
|
879f5092b7 | ||
|
|
6226717d18 | ||
|
|
784285605e | ||
|
|
71bd7b235a | ||
|
|
13204e4027 | ||
|
|
48dff49299 | ||
|
|
3ed8797097 | ||
|
|
a13ba2152a | ||
|
|
ed8474e132 | ||
|
|
da0a395c2d | ||
|
|
0bb182b4e7 | ||
|
|
1cfb41d6b3 | ||
|
|
65791a2812 | ||
|
|
ca50d5352f | ||
|
|
cb35164af7 | ||
|
|
88e9634541 | ||
|
|
e54780743a | ||
|
|
6aa4695322 | ||
|
|
deb55618fe | ||
|
|
c4dd81a0bc | ||
|
|
402225e3e8 | ||
|
|
73cc97f8ff | ||
|
|
86b9f12098 | ||
|
|
d6aa13f4b2 | ||
|
|
93678232d8 | ||
|
|
04d29c0bfb | ||
|
|
4dc08910c6 | ||
|
|
4c5a8e038d | ||
|
|
d06753403c | ||
|
|
d35f73f87f | ||
|
|
d190a1e042 | ||
|
|
dc30ee21fd | ||
|
|
fa615a1786 | ||
|
|
59349657da | ||
|
|
dbdf7a99f1 | ||
|
|
ee908d69ed | ||
|
|
d2e40ddf91 | ||
|
|
c6bc7ec185 | ||
|
|
f491d500a6 | ||
|
|
3ed94ababd | ||
|
|
96fdcf9e54 | ||
|
|
dd4538ce50 | ||
|
|
373d415a07 | ||
|
|
de3495d03f | ||
|
|
6871bc4eca | ||
|
|
6b95067732 | ||
|
|
99abb18825 | ||
|
|
c4971681e5 | ||
|
|
b277759f58 | ||
|
|
88a1229a23 | ||
|
|
c987ad03d2 | ||
|
|
6418c44e30 | ||
|
|
d4517fbe64 | ||
|
|
6d84278f86 | ||
|
|
5eeba5b34b | ||
|
|
f2cafe04ff | ||
|
|
d08ffa5eb4 | ||
|
|
89055ea452 | ||
|
|
d0c9541679 | ||
|
|
392dfc6352 | ||
|
|
157c747d18 | ||
|
|
f5a130a3b7 | ||
|
|
79e77ff65c | ||
|
|
dba8c3fd9d | ||
|
|
1faaf698fd | ||
|
|
27ce5604c2 | ||
|
|
1ad14e1334 | ||
|
|
fffd710005 | ||
|
|
770e4a885e | ||
|
|
254b5a3dfb | ||
|
|
b12562a639 | ||
|
|
db00ec914f | ||
|
|
73b69e2df6 | ||
|
|
bbaed49beb | ||
|
|
d6d7c48230 | ||
|
|
995c19d6da | ||
|
|
aef6e73a60 | ||
|
|
b8fc557543 | ||
|
|
be58f09ec0 | ||
|
|
e72ca29407 | ||
|
|
da7639aa2f | ||
|
|
e23b344824 | ||
|
|
b7b2a53851 | ||
|
|
cdd9d150c1 | ||
|
|
1d4b2a66fa | ||
|
|
c48972c4be | ||
|
|
ebe490b5e0 | ||
|
|
bddcd1d063 | ||
|
|
5ab1344819 | ||
|
|
ec7e8ac2d1 | ||
|
|
227fffd37e | ||
|
|
4858af2500 | ||
|
|
d1cd32b37c | ||
|
|
00dc10bcf7 | ||
|
|
fb5ce3e79d | ||
|
|
0e572b4272 | ||
|
|
b79be4daaa | ||
|
|
70912a29be | ||
|
|
01783dd2e4 | ||
|
|
3ddc5e0530 | ||
|
|
f008245c02 | ||
|
|
3d17af437f | ||
|
|
ec9470ebeb | ||
|
|
b0cc9fc900 | ||
|
|
a7629631d5 | ||
|
|
fcb715009f | ||
|
|
be07c062ff | ||
|
|
f30d7f952c | ||
|
|
aba478ed12 | ||
|
|
e944d1e4b5 | ||
|
|
7f864b037a | ||
|
|
c32a681e13 | ||
|
|
34761e4b0f | ||
|
|
51ca6adf54 | ||
|
|
b2ec929fb0 | ||
|
|
680bb353d3 | ||
|
|
f0cadc97d2 |
@@ -13,6 +13,7 @@ Morrison, Christopher Sean (sean, morrison, brlcad)
|
||||
Paviot, Thomas (tpaviot)
|
||||
Pictor, Mark (mpictor)
|
||||
Thomas, Dawn (homovulgaris, madant)
|
||||
Wouters, Dave (davyw)
|
||||
Yapp, Clifford (starseeker)
|
||||
|
||||
Special thanks:
|
||||
|
||||
+222
-96
@@ -38,36 +38,61 @@
|
||||
# This file contains the top level CMakeLists.txt logic for the
|
||||
# SCL software package.
|
||||
|
||||
PROJECT(SCL)
|
||||
|
||||
# SCL version
|
||||
SET(SCL_VERSION_MAJOR 0)
|
||||
SET(SCL_VERSION_MINOR 5-dev)
|
||||
SET(SCL_VERSION ${SCL_VERSION_MAJOR}.${SCL_VERSION_MINOR})
|
||||
|
||||
# SCL ABI version. SCL_ABI_SOVERSION should be incremented
|
||||
# for each release introducing API incompatibilities
|
||||
SET(SCL_ABI_SOVERSION 2)
|
||||
SET(SCL_ABI_VERSION ${SCL_ABI_SOVERSION}.0.0)
|
||||
|
||||
# Minimum required version of CMake
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
IF(COMMAND CMAKE_POLICY)
|
||||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND CMAKE_POLICY)
|
||||
|
||||
# set CMake project name
|
||||
PROJECT(SCL)
|
||||
IF( NOT DEFINED SCL_BUILD_TYPE )
|
||||
SET( SCL_BUILD_TYPE "Debug" CACHE STRING "Build type" ) # By default set debug build
|
||||
ENDIF( NOT DEFINED SCL_BUILD_TYPE )
|
||||
IF(NOT SCL_IS_SUBBUILD)
|
||||
SET(CMAKE_BUILD_TYPE ${SCL_BUILD_TYPE} CACHE INTERNAL "Build type, immutable" FORCE )
|
||||
ELSE(NOT SCL_IS_SUBBUILD)
|
||||
SET(CMAKE_BUILD_TYPE ${SCL_BUILD_TYPE} )
|
||||
ENDIF(NOT SCL_IS_SUBBUILD)
|
||||
|
||||
if( CMAKE_BUILD_TYPE STREQUAL "" )
|
||||
message( "Debug build - to override, rerun cmake with '-DCMAKE_BUILD_TYPE=Release'." )
|
||||
set( CMAKE_BUILD_TYPE Debug )
|
||||
endif()
|
||||
# Define helper macro OPTION_WITH_DEFAULT
|
||||
MACRO( OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT )
|
||||
IF( NOT DEFINED ${OPTION_NAME} )
|
||||
SET( ${OPTION_NAME} ${OPTION_DEFAULT} )
|
||||
ENDIF( NOT DEFINED ${OPTION_NAME} )
|
||||
OPTION( ${OPTION_NAME} "${OPTION_STRING}" ${${OPTION_NAME}} )
|
||||
ENDMACRO( OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT )
|
||||
|
||||
# build shared libs by default
|
||||
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
OPTION_WITH_DEFAULT(SCL_BUILD_SHARED_LIBS "Build shared libs" ON )
|
||||
|
||||
# build static libs by default
|
||||
OPTION(BUILD_STATIC_LIBS "Build static libraries" OFF)
|
||||
# don't build static libs by default
|
||||
OPTION_WITH_DEFAULT(SCL_BUILD_STATIC_LIBS "Build static libs" OFF)
|
||||
|
||||
# Set version
|
||||
SET(SCL_VERSION_MAJOR "3")
|
||||
SET(SCL_VERSION_MINOR "2")
|
||||
SET(SCL_VERSION_PATCH "0")
|
||||
SET(SCL_VERSION "${SCL_VERSION_MAJOR}.${SCL_VERSION_MINOR}.${SCL_VERSION_PATCH}")
|
||||
OPTION_WITH_DEFAULT(SCL_PYTHON_GENERATOR "Compile fedex_python" ON)
|
||||
OPTION_WITH_DEFAULT(SCL_CPP_GENERATOR "Compile fedex_plus" ON)
|
||||
|
||||
OPTION_WITH_DEFAULT(SCL_MEMMGR_ENABLE_CHECKS "Enable scl_memmgr's memory leak detection" OFF)
|
||||
OPTION_WITH_DEFAULT(SCL_TRACE_FPRINTF "Enable extra comments in generated code so the code's source in fedex_plus may be located" OFF)
|
||||
|
||||
# CMake derives much of its functionality from modules, typically
|
||||
# stored in one directory - let CMake know where to find them.
|
||||
SET(SCL_CMAKE_DIR "${SCL_SOURCE_DIR}/cmake")
|
||||
SET(CMAKE_MODULE_PATH "${SCL_CMAKE_DIR};${CMAKE_MODULE_PATH}")
|
||||
if(NOT IS_SUBBUILD)
|
||||
SET(CMAKE_MODULE_PATH "${SCL_CMAKE_DIR};${CMAKE_MODULE_PATH}")
|
||||
else(NOT IS_SUBBUILD)
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${SCL_CMAKE_DIR}")
|
||||
endif(NOT IS_SUBBUILD)
|
||||
|
||||
INCLUDE(${SCL_CMAKE_DIR}/SCL_Utils.cmake)
|
||||
|
||||
@@ -77,78 +102,89 @@ SET(_orig_lc_all $ENV{LC_ALL})
|
||||
SET(_orig_lc_messages $ENV{LC_MESSAGES})
|
||||
SET(_orig_lang $ENV{LANG})
|
||||
IF(_orig_lc_all)
|
||||
SET(ENV{LC_ALL} C)
|
||||
SET(ENV{LC_ALL} C)
|
||||
ENDIF(_orig_lc_all)
|
||||
IF(_orig_lc_messages)
|
||||
SET(ENV{LC_MESSAGES} C)
|
||||
SET(ENV{LC_MESSAGES} C)
|
||||
ENDIF(_orig_lc_messages)
|
||||
IF(_orig_lang)
|
||||
SET(ENV{LANG} C)
|
||||
SET(ENV{LANG} C)
|
||||
ENDIF(_orig_lang)
|
||||
|
||||
# For NFS volumes, to ensure proper file creation.
|
||||
IF(NOT WIN32)
|
||||
IF(NOT UMASK)
|
||||
EXEC_PROGRAM(umask ARGS 022 OUTPUT_VARIABLE exec_out)
|
||||
ELSE(NOT UMASK)
|
||||
EXEC_PROGRAM(umask ARGS ${UMASK} OUTPUT_VARIABLE exec_out)
|
||||
ENDIF(NOT UMASK)
|
||||
ENDIF(NOT WIN32)
|
||||
#---------------------------------------------------------------------
|
||||
# Testing option
|
||||
OPTION_WITH_DEFAULT( SCL_ENABLE_TESTING "Enable unittesting framework" OFF )
|
||||
IF(SCL_ENABLE_TESTING)
|
||||
if( NOT DEFINED SCL_BUILD_SCHEMAS )
|
||||
set( SCL_BUILD_SCHEMAS "ALL" ) #test all schemas, unless otherwise specified
|
||||
endif()
|
||||
INCLUDE(CTest)
|
||||
ENABLE_TESTING()
|
||||
ENDIF(SCL_ENABLE_TESTING)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# The following logic is what allows binaries to run successfully in
|
||||
# the build directory AND install directory. Thanks to plplot for
|
||||
# Coverage option
|
||||
OPTION_WITH_DEFAULT( SCL_ENABLE_COVERAGE "Enable code coverage test" OFF )
|
||||
IF(SCL_ENABLE_COVERAGE)
|
||||
SET(SCL_ENABLE_TESTING ON CACHE BOOL "Testing enabled by coverage option" FORCE)
|
||||
# build static libs, better coverage report
|
||||
SET(SCL_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE )
|
||||
SET(SCL_BUILD_STATIC_LIBS ON CACHE BOOL "Build static libs" FORCE )
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING "Extra compile flags required by code coverage" FORCE)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING "Extra compile flags required by code coverage" FORCE)
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage" CACHE STRING "Extra linker flags required by code coverage" FORCE)
|
||||
SET(SCL_BUILD_TYPE "Debug" CACHE STRING "Build type required by testing framework" FORCE)
|
||||
ENDIF(SCL_ENABLE_COVERAGE)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# The following logic is what allows binaries to run successfully in
|
||||
# the build directory AND install directory. Thanks to plplot for
|
||||
# identifying the necessity of setting CMAKE_INSTALL_NAME_DIR on OSX.
|
||||
# Documentation of these options is available at
|
||||
# http://www.cmake.org/Wiki/CMake_RPATH_handling
|
||||
|
||||
# use, i.e. don't skip the full RPATH for the build tree
|
||||
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
|
||||
# when building, don't use the install RPATH already
|
||||
# (but later on when installing)
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
|
||||
# the RPATH/INSTALL_NAME_DIR to be used when installing
|
||||
if (NOT APPLE)
|
||||
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:\$ORIGIN/../lib")
|
||||
endif(NOT APPLE)
|
||||
SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
# On OSX, we need to set INSTALL_NAME_DIR instead of RPATH
|
||||
# http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_INSTALL_NAME_DIR
|
||||
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
|
||||
# add the automatically determined parts of the RPATH which point to
|
||||
# add the automatically determined parts of the RPATH which point to
|
||||
# directories outside the build tree to the install RPATH
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Output directories.
|
||||
IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
IF(WIN32)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
|
||||
ELSE(WIN32)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
|
||||
ENDIF(WIN32)
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
|
||||
ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
IF(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
|
||||
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
|
||||
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
|
||||
ENDIF(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
|
||||
IF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
|
||||
ENDIF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
|
||||
|
||||
FOREACH(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
|
||||
STRING(TOUPPER "${CFG_TYPE}" CFG_TYPE)
|
||||
IF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
IF(WIN32)
|
||||
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
|
||||
ELSE(WIN32)
|
||||
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
IF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
|
||||
ENDIF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
IF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
|
||||
ENDIF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
STRING(TOUPPER "${CFG_TYPE}" CFG_TYPE)
|
||||
IF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
|
||||
ENDIF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
IF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
|
||||
ENDIF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
IF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
|
||||
ENDIF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
@@ -158,81 +194,171 @@ ENDFOREACH()
|
||||
# The location in which to install SCL. Need a good Debug location
|
||||
# for Windows. Only do this if CMAKE_INSTALL_PREFIX hasn't been set
|
||||
# already, to try and allow parent builds (if any) some control.
|
||||
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
IF(NOT WIN32)
|
||||
IF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr")
|
||||
ELSEIF ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
|
||||
MESSAGE("setting debug output dir")
|
||||
SET(CMAKE_INSTALL_PREFIX "${SCL_SOURCE_DIR}/../scl-install")
|
||||
ELSE("${CMAKE_BUILD_TYPE}" MATCHES "Release")
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
ENDIF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
|
||||
ENDIF(NOT WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "SCL install prefix" FORCE)
|
||||
SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
|
||||
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
if(NOT SCL_IS_SUBBUILD)
|
||||
IF(NOT WIN32)
|
||||
IF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
|
||||
SET(SCL_INSTALL_PREFIX "${SCL_SOURCE_DIR}/../scl-install")
|
||||
ELSE()
|
||||
SET(SCL_INSTALL_PREFIX "/usr/local")
|
||||
ENDIF()
|
||||
ENDIF(NOT WIN32)
|
||||
SET( SCL_INSTALL_PREFIX ${SCL_INSTALL_PREFIX} CACHE
|
||||
PATH "Install prefix prepended to target to create install location" )
|
||||
SET( CMAKE_INSTALL_PREFIX ${SCL_INSTALL_PREFIX} CACHE INTERNAL "Prefix prepended to install directories if target destination is not absolute, immutable" FORCE )
|
||||
endif(NOT SCL_IS_SUBBUILD)
|
||||
|
||||
OPTION(SCL-BUILD_EXPRESS_ONLY "Only build express parser." OFF)
|
||||
MARK_AS_ADVANCED(SCL-BUILD_EXPRESS_ONLY)
|
||||
OPTION(SCL_BUILD_EXPRESS_ONLY "Only build express parser." OFF)
|
||||
MARK_AS_ADVANCED(SCL_BUILD_EXPRESS_ONLY)
|
||||
|
||||
# Take the scl config file template and copy it to the build directory so CMake
|
||||
# scripts can append to it if need be
|
||||
configure_file(${SCL_SOURCE_DIR}/include/scl_cf_cmake.h.in ${SCL_BINARY_DIR}/include/scl_cf.h.in COPYONLY)
|
||||
# Take the scl config file template as the starting point for
|
||||
# scl_cf.h.in - scripts may need to append to the template, so
|
||||
# it is read into memory initially.
|
||||
SET(CONFIG_H_FILE ${SCL_BINARY_DIR}/include/scl_cf.h.in)
|
||||
set(CMAKE_CURRENT_PROJECT SCL)
|
||||
define_property(GLOBAL PROPERTY SCL_CONFIG_H_CONTENTS BRIEF_DOCS "config.h.in contents" FULL_DOCS "config.h.in contents for SCL project")
|
||||
if(NOT COMMAND CONFIG_H_APPEND)
|
||||
macro(CONFIG_H_APPEND PROJECT_NAME NEW_CONTENTS)
|
||||
if(PROJECT_NAME)
|
||||
get_property(${PROJECT_NAME}_CONFIG_H_CONTENTS GLOBAL PROPERTY ${PROJECT_NAME}_CONFIG_H_CONTENTS)
|
||||
set(${PROJECT_NAME}_CONFIG_H_FILE_CONTENTS "${${PROJECT_NAME}_CONFIG_H_CONTENTS}${NEW_CONTENTS}")
|
||||
set_property(GLOBAL PROPERTY ${PROJECT_NAME}_CONFIG_H_CONTENTS "${${PROJECT_NAME}_CONFIG_H_FILE_CONTENTS}")
|
||||
endif(PROJECT_NAME)
|
||||
endmacro(CONFIG_H_APPEND NEW_CONTENTS)
|
||||
endif(NOT COMMAND CONFIG_H_APPEND)
|
||||
file(READ ${SCL_SOURCE_DIR}/include/scl_cf_cmake.h.in CONFIG_H_FILE_CONTENTS)
|
||||
CONFIG_H_APPEND(SCL "${CONFIG_H_FILE_CONTENTS}")
|
||||
|
||||
INCLUDE(CheckLibraryExists)
|
||||
INCLUDE(CheckIncludeFile)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
INCLUDE(CheckTypeSize)
|
||||
INCLUDE(CMakePushCheckState)
|
||||
INCLUDE(CheckCXXSourceRuns)
|
||||
INCLUDE(${SCL_CMAKE_DIR}/FindLEX.cmake)
|
||||
INCLUDE(${SCL_CMAKE_DIR}/FindYACC.cmake)
|
||||
|
||||
CHECK_INCLUDE_FILE(ndir.h HAVE_NDIR_H)
|
||||
CHECK_INCLUDE_FILE(stdarg.h HAVE_STDARG_H)
|
||||
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
|
||||
CHECK_INCLUDE_FILE(sys/param.h HAVE_SYS_PARAM_H)
|
||||
CHECK_INCLUDE_FILE(sysent.h HAVE_SYSENT_H)
|
||||
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
|
||||
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
|
||||
CHECK_INCLUDE_FILE(process.h HAVE_PROCESS_H)
|
||||
CHECK_INCLUDE_FILE(io.h HAVE_IO_H)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(abs HAVE_ABS)
|
||||
CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)
|
||||
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
|
||||
CHECK_FUNCTION_EXISTS(getopt HAVE_GETOPT)
|
||||
|
||||
CHECK_TYPE_SIZE("ssize_t" SSIZE_T)
|
||||
|
||||
#set GIT_COMMIT_ID to the output of `git describe`
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags RESULT_VARIABLE res_var OUTPUT_VARIABLE GIT_COM_ID )
|
||||
if( NOT ${res_var} EQUAL 0 )
|
||||
set( GIT_COMMIT_ID "unknown (git failed!)")
|
||||
message( WARNING "Git failed (not a repo?). Build will not contain git revision info." )
|
||||
endif()
|
||||
string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COM_ID} )
|
||||
else()
|
||||
set( GIT_COMMIT_ID "unknown (git not found!)")
|
||||
message( WARNING "Git not found. Build will not contain git revision info." )
|
||||
endif()
|
||||
set( TEST_STD_THREAD "
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
void do_work() {
|
||||
std::cout << \"thread\" << std::endl;
|
||||
}
|
||||
int main() {
|
||||
std::thread t(do_work);
|
||||
t.join();
|
||||
}
|
||||
" )
|
||||
cmake_push_check_state()
|
||||
if( UNIX )
|
||||
set( CMAKE_REQUIRED_FLAGS "-pthread -std=c++0x" )
|
||||
else( UNIX )
|
||||
# vars probably need set for MSVC11, embarcadero, etc
|
||||
endif( UNIX )
|
||||
CHECK_CXX_SOURCE_RUNS( "${TEST_STD_THREAD}" HAVE_STD_THREAD ) #quotes are *required*!
|
||||
cmake_pop_check_state()
|
||||
|
||||
# Now that all the tests are done, configure the scl_cf.h file:
|
||||
configure_file(${SCL_BINARY_DIR}/include/scl_cf.h.in ${SCL_BINARY_DIR}/include/scl_cf.h)
|
||||
get_property(CONFIG_H_FILE_CONTENTS GLOBAL PROPERTY SCL_CONFIG_H_CONTENTS)
|
||||
file(WRITE ${CONFIG_H_FILE} "${CONFIG_H_FILE_CONTENTS}")
|
||||
configure_file(${CONFIG_H_FILE} ${SCL_BINARY_DIR}/include/scl_cf.h)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H -Wall
|
||||
)
|
||||
################ create scl_version_string.h, http://stackoverflow.com/questions/3780667
|
||||
# Using 'ver_string' instead of 'scl_version_string.h' is a trick to force the
|
||||
# command to always execute when the custom target is built. It works because
|
||||
# a file by that name never exists.
|
||||
configure_file(${SCL_CMAKE_DIR}/scl_version_string.cmake ${SCL_BINARY_DIR}/scl_version_string.cmake @ONLY)
|
||||
add_custom_target(version_string ALL DEPENDS ver_string )
|
||||
# creates scl_version_string.h using cmake script
|
||||
add_custom_command(OUTPUT ver_string ${CMAKE_CURRENT_BINARY_DIR}/include/scl_version_string.h
|
||||
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${SCL_SOURCE_DIR}
|
||||
-DBINARY_DIR=${SCL_BINARY_DIR}
|
||||
-P ${SCL_BINARY_DIR}/scl_version_string.cmake)
|
||||
# scl_version_string.h is a generated file
|
||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/include/scl_version_string.h
|
||||
PROPERTIES GENERATED TRUE
|
||||
HEADER_FILE_ONLY TRUE )
|
||||
################
|
||||
|
||||
if(MSVC)
|
||||
# add_definitions( -Wall )
|
||||
add_definitions( -D__MSVC__ -D__WIN32__ )
|
||||
# Disable warning for preferred usage of secure functions (example strcpy should be strcpy_s, ...)
|
||||
add_definitions( -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS )
|
||||
elseif(BORLAND)
|
||||
add_definitions( -D__BORLAND__ -D__WIN32__ )
|
||||
else()
|
||||
add_definitions( -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long )
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${SCL_SOURCE_DIR}/include
|
||||
${SCL_BINARY_DIR}/include
|
||||
)
|
||||
${SCL_SOURCE_DIR}/include
|
||||
${SCL_BINARY_DIR}/include
|
||||
)
|
||||
|
||||
ADD_SUBDIRECTORY(src/base)
|
||||
ADD_SUBDIRECTORY(src/express)
|
||||
ADD_SUBDIRECTORY(src/exppp)
|
||||
ADD_SUBDIRECTORY(src/fedex_plus)
|
||||
ADD_SUBDIRECTORY(src/fedex_python)
|
||||
ADD_SUBDIRECTORY(src/clstepcore)
|
||||
ADD_SUBDIRECTORY(src/cleditor)
|
||||
ADD_SUBDIRECTORY(src/cldai)
|
||||
ADD_SUBDIRECTORY(src/clutils)
|
||||
ADD_SUBDIRECTORY(include)
|
||||
ADD_SUBDIRECTORY(data)
|
||||
IF(SCL_ENABLE_TESTING)
|
||||
ADD_SUBDIRECTORY( test )
|
||||
ENDIF(SCL_ENABLE_TESTING)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
|
||||
# this is for testing - 'make core' builds everything that isn't generated
|
||||
add_custom_target( core )
|
||||
add_dependencies( core stepdai check-express stepeditor fedex_plus )
|
||||
|
||||
if(NOT SCL_IS_SUBBUILD)
|
||||
###############################################################################
|
||||
# SCL Packaging #
|
||||
# $make package #
|
||||
###############################################################################
|
||||
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "STEP Class Library")
|
||||
SET(CPACK_SET_DESTDIR "ON")
|
||||
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${SCL_VERSION_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${SCL_VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_NAME SCL )
|
||||
|
||||
SET(CPACK_PACKAGE_CONTACT "SCL Developers <scl-dev@googlegroups.com>")
|
||||
INCLUDE(CPack)
|
||||
|
||||
########################################################################################
|
||||
# Uninstall code #
|
||||
# From http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F #
|
||||
# ######################################################################################
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
|
||||
endif(NOT SCL_IS_SUBBUILD)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
set(CTEST_CUSTOM_WARNING_MATCH ${CTEST_CUSTOM_WARNING_MATCH} "{standard input}:[0-9][0-9]*: WARNING: ")
|
||||
set(CTEST_CUSTOM_ERROR_MATCH ${CTEST_CUSTOM_ERROR_MATCH} "{standard input}:[0-9][0-9]*: ERROR : ")
|
||||
|
||||
set(CTEST_PROJECT_NAME "StepClassLibrary")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=StepClassLibrary")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
@@ -6,7 +6,7 @@ STEP Class Library.
|
||||
These installation requires that you have the following software
|
||||
available:
|
||||
|
||||
- C and C++ compilers (only gcc has been tested recently)
|
||||
- C and C++ compilers (Tested with GCC, MSVC, Embarcadero)
|
||||
- bison, byacc, or yacc (only bison has been tested recently)
|
||||
- flex or lex (only flex has been tested recently)
|
||||
- CMake
|
||||
@@ -21,12 +21,22 @@ Installation
|
||||
* Build system uses CMake now: configure, Makefile, and all
|
||||
autotools files have been removed, as has mkProbe.
|
||||
|
||||
* To build:
|
||||
cd scl
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
* Building SCL from the command prompt:
|
||||
- cd scl
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- make
|
||||
- make install # optional
|
||||
|
||||
* Building SCL from the GUI:
|
||||
- Run cmake-gui, set it to build in scl/build
|
||||
- Select the correct build file generator
|
||||
- Press Configure
|
||||
- Change options as necessary, configuring again afterwards
|
||||
- If there are errors, some options may not be visible until the error is resolved
|
||||
- Press Generate
|
||||
- Open the main build file using your preferred build tool
|
||||
|
||||
* Build options (append to the 'cmake ..' line):
|
||||
-DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
|
||||
@@ -39,8 +49,22 @@ Installation
|
||||
otherwise, the input and output files should be identical. If
|
||||
they are not identical, either the file does not match the
|
||||
schema, or SCL generated incorrect source code.
|
||||
-DDISABLE_P21READ=TRUE
|
||||
- disable p21read. probably not a useful option.
|
||||
-DBUILD_SCHEMAS=ALL
|
||||
- Added to make use of ctest easier. If BUILD_SCHEMAS == ALL,
|
||||
then CMake adds each *.exp file found in data/.
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- this causes binaries to be built without debugging information
|
||||
- without this, cmake defaults to a Debug build
|
||||
|
||||
* Using CTest to test SCL:
|
||||
- Read the comments in run_ctest.cmake
|
||||
- (OPTIONAL) Create scl/../.SCL_CTEST_PREFS.cmake, and set variables
|
||||
in it (this file is required for CDash submission to be enabled)
|
||||
- Run tests with `ctest -S run_ctest.cmake`
|
||||
|
||||
* Using CTest to regenerate the schema matrix on the github SCL wiki:
|
||||
- Requires:
|
||||
- git
|
||||
- python
|
||||
- a clone of the git repo for the wiki at scl/../wiki-scl
|
||||
- run `ctest -S ctest_matrix.cmake`
|
||||
|
||||
@@ -1,5 +1,48 @@
|
||||
STEP Class Library ------ https://github.com/mpictor/StepClassLibrary
|
||||
STEP Class Library ------ http://github.com/mpictor/StepClassLibrary
|
||||
************************************************************************
|
||||
Release 0.5 (Feb 23, 2012)
|
||||
|
||||
New since v0.4:
|
||||
* MSVC and Embarcadero support, along with many warning fixes
|
||||
* Experimental Python support
|
||||
* Now handles most features of EXPRESS - all included schemas,
|
||||
with the exception of AP209 CD, are parsed without error. Enums are
|
||||
now in their own dictionary. Allow indexing on aggregates, generics,
|
||||
and binaries.
|
||||
* Changes to fedex_plus that improve the generated c++ - use a
|
||||
namespace, break up large static strings, make EXPRESS multiple
|
||||
inheritance work by not printing multiple copies of inherited members.
|
||||
All schemas now compile without error, but there are numerous warnings.
|
||||
* Exchange files: handle all comments, fill in some missing attributes.
|
||||
* More cleanup of source code, more documentation in scl/doc
|
||||
* Special thanks to @davyw and @tpaviot for their large contributions
|
||||
(MSVC and Python, respectively)
|
||||
************************************************************************
|
||||
Release 0.4 (Nov 13, 2011)
|
||||
|
||||
New since v0.3:
|
||||
* Improve p21read performance by ~30%
|
||||
* Improve fedex_plus performance by ~4300% (!)
|
||||
* A variable defined in a LOCAL is not required to have a type label
|
||||
(affected ap242,210e3,209)
|
||||
* Enums and entities are allowed to have the same names
|
||||
(affected ap242,210e3,209)
|
||||
* Remove the SCLP23 macro
|
||||
http://github.com/mpictor/StepClassLibrary/wiki/changelog-v0.4
|
||||
************************************************************************
|
||||
|
||||
Release 0.3 (Oct 29, 2011)
|
||||
|
||||
What's new since v0.2?
|
||||
|
||||
* Start using CTest
|
||||
* Add a number of schemas, update IFC2X4 to RC3, update AP235 to TC
|
||||
* Update the exchange file header schema to edition two; drop support
|
||||
for N279 files
|
||||
* In p21read, check that the schema name for the file and library match
|
||||
* Fix bug with exchange files that contain strings ending in 'S'
|
||||
************************************************************************
|
||||
|
||||
Release 0.2 (Oct 1, 2011)
|
||||
|
||||
What's new since v0.1?
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
***********************************************************************
|
||||
Step Class Library v0.1 -- https://github.com/mpictor/StepClassLibrary
|
||||
Step Class Library v0.5 -- http://github.com/mpictor/StepClassLibrary
|
||||
|
||||
* What is SCL? SCL reads ISO10303-11 EXPRESS schemas and generates
|
||||
C++ source code that can read and write Part 21 files conforming
|
||||
to that schema. SCL could also work with ObjectStore, CORBA IDL,
|
||||
and C - but to my knowledge, that code has not been exercised in
|
||||
a very long time. Some of the ObjectStore code has been removed,
|
||||
and CORBA may follow it if there is no interest.
|
||||
C++ source code that can read and write Part 21 files conforming
|
||||
to that schema. In addition to C++, v0.5 includes experimental
|
||||
support for Python.
|
||||
|
||||
* SCL is packaged along with some other tools. See
|
||||
"THE NIST STEP TOOLSET", below. In particular, Data Probe
|
||||
@@ -21,29 +19,7 @@ Step Class Library v0.1 -- https://github.com/mpictor/StepClassLibrary
|
||||
* Build system uses only CMake now: configure, Makefile, and all
|
||||
autotools files have been removed, as has mkProbe.
|
||||
|
||||
* To build:
|
||||
cd scl
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
|
||||
* Build options (append to the 'cmake ..' line):
|
||||
-DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
|
||||
- this generates c++ for the schema, and compiles it into a
|
||||
library. Also works with directories, as long as each dir only
|
||||
has one express file.
|
||||
- multiple files/directories are separated by semicolons
|
||||
- this also builds a 'p21read' program, which reads one step file
|
||||
and writes another. It may change whitespace or remove comments;
|
||||
otherwise, the input and output files should be identical. If
|
||||
they are not identical, either the file does not match the
|
||||
schema, or SCL generated incorrect source code.
|
||||
-DDISABLE_P21READ=TRUE
|
||||
- disable p21read. probably not a useful option.
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- this causes binaries to be built without debugging information
|
||||
- without this, cmake defaults to a Debug build
|
||||
* Building and testing SCL - see the INSTALL file
|
||||
|
||||
***********************************************************************
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0.5
|
||||
@@ -151,9 +151,6 @@ IF(LEX_EXECUTABLE)
|
||||
SET(FILE_RUN_DEFINITIONS "-DYYTEXT_POINTER=1")
|
||||
CHECK_C_FILE_RUNS(${CMAKE_CURRENT_SOURCE_DIR}/cmake/test_srcs/sys_wait_test.c YYTEXT_POINTER)
|
||||
SET(FILE_RUN_DEFINITIONS)
|
||||
IF(CONFIG_H_FILE)
|
||||
FILE(APPEND ${CONFIG_H_FILE} "#cmakedefine YYTEXT_POINTER 1\n")
|
||||
ENDIF(CONFIG_H_FILE)
|
||||
|
||||
|
||||
ENDIF(LEX_EXECUTABLE)
|
||||
|
||||
@@ -33,15 +33,15 @@ MACRO(SCL_ADDLIB libname srcs libs)
|
||||
STRING(REGEX REPLACE " " ";" libslist1 "${libs}")
|
||||
STRING(REGEX REPLACE "-framework;" "-framework " libslist "${libslist1}")
|
||||
DLL_DEFINE(${libname})
|
||||
IF(BUILD_SHARED_LIBS)
|
||||
IF(SCL_BUILD_SHARED_LIBS)
|
||||
add_library(${libname} SHARED ${srcslist})
|
||||
if(NOT ${libs} MATCHES "NONE")
|
||||
target_link_libraries(${libname} ${libslist})
|
||||
endif(NOT ${libs} MATCHES "NONE")
|
||||
SET_TARGET_PROPERTIES(${libname} PROPERTIES VERSION ${SCL_VERSION_MAJOR}.${SCL_VERSION_MINOR} SOVERSION ${SCL_VERSION_MAJOR} )
|
||||
SET_TARGET_PROPERTIES(${libname} PROPERTIES VERSION ${SCL_ABI_VERSION} SOVERSION ${SCL_ABI_SOVERSION} )
|
||||
INSTALL(TARGETS ${libname} DESTINATION lib)
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
IF(BUILD_STATIC_LIBS AND NOT MSVC)
|
||||
ENDIF(SCL_BUILD_SHARED_LIBS)
|
||||
IF(SCL_BUILD_STATIC_LIBS AND NOT MSVC)
|
||||
add_library(${libname}-static STATIC ${srcslist})
|
||||
if(NOT ${libs} MATCHES "NONE")
|
||||
target_link_libraries(${libname}-static ${libslist})
|
||||
@@ -56,7 +56,7 @@ MACRO(SCL_ADDLIB libname srcs libs)
|
||||
SET_TARGET_PROPERTIES(${libname}-static PROPERTIES PREFIX "lib")
|
||||
ENDIF(WIN32)
|
||||
INSTALL(TARGETS ${libname}-static DESTINATION lib)
|
||||
ENDIF(BUILD_STATIC_LIBS AND NOT MSVC)
|
||||
ENDIF(SCL_BUILD_STATIC_LIBS AND NOT MSVC)
|
||||
# Enable extra compiler flags if local libraries and/or global options dictate
|
||||
SET(LOCAL_COMPILE_FLAGS "")
|
||||
FOREACH(extraarg ${ARGN})
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
list(REVERSE files)
|
||||
foreach (file ${files})
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if (EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT ${rm_retval} EQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif (NOT ${rm_retval} EQUAL 0)
|
||||
else (EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif (EXISTS "$ENV{DESTDIR}${file}")
|
||||
endforeach(file)
|
||||
@@ -0,0 +1,58 @@
|
||||
#use git for a pretty commit id
|
||||
#uses 'git describe --tags', so tags are required in the repo
|
||||
#create a tag with 'git tag <name>' and 'git push --tags'
|
||||
|
||||
# http://stackoverflow.com/questions/3780667
|
||||
# http://www.cmake.org/pipermail/cmake/2009-February/027014.html
|
||||
|
||||
#scl_version_string.h defines scl_version() which returns a pretty commit description and a build timestamp.
|
||||
|
||||
set(SCL_IS_SUBBUILD "@SCL_IS_SUBBUILD@")
|
||||
|
||||
set(VERS_FILE ${SOURCE_DIR}/SCL_VERSION.txt )
|
||||
if( EXISTS ${SOURCE_DIR}/.git )
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags RESULT_VARIABLE res_var OUTPUT_VARIABLE GIT_COMMIT_ID )
|
||||
if( NOT ${res_var} EQUAL 0 )
|
||||
file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 )
|
||||
if(NOT SCL_IS_SUBBUILD)
|
||||
message( WARNING "Git failed (probably no tags in repo). Build will contain revision info from ${VERS_FILE}." )
|
||||
endif(NOT SCL_IS_SUBBUILD)
|
||||
endif()
|
||||
else(GIT_FOUND)
|
||||
file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 )
|
||||
if(NOT SCL_IS_SUBBUILD)
|
||||
message( WARNING "Git not found. Build will contain revision info from ${VERS_FILE}." )
|
||||
endif(NOT SCL_IS_SUBBUILD)
|
||||
endif(GIT_FOUND)
|
||||
else()
|
||||
file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 )
|
||||
if(NOT SCL_IS_SUBBUILD)
|
||||
message( WARNING "Git failed ('.git' not found). Build will contain revision info from ${VERS_FILE}." )
|
||||
endif(NOT SCL_IS_SUBBUILD)
|
||||
endif()
|
||||
|
||||
string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COMMIT_ID} )
|
||||
|
||||
set( vstring "//scl_version_string.h - written by cmake. Changes will be lost!\n"
|
||||
"#ifndef SCL_VERSION_STRING\n"
|
||||
"#define SCL_VERSION_STRING\n\n"
|
||||
"/*\n** Returns a string like \"test-1-g5e1fb47, built at TIME on DATE\", where test is the\n"
|
||||
"** name of the last tagged git revision, 1 is the number of commits since that tag,\n"
|
||||
"** 'g' is unknown, 5e1fb47 is the first 7 chars of the git sha1 commit id, and TIME\n"
|
||||
"** and DATE are substituted by the compiler.\n*/\n\n"
|
||||
"const char* scl_version() {\n"
|
||||
" return \"git commit id ${GIT_COMMIT_ID}, built at \"__TIME__\" on \"__DATE__\;\n"
|
||||
"}\n\n"
|
||||
"#endif\n"
|
||||
)
|
||||
|
||||
file(WRITE scl_version_string.h.txt ${vstring} )
|
||||
# copy the file to the final header only if the version changes
|
||||
# reduces needless rebuilds
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
scl_version_string.h.txt ${BINARY_DIR}/include/scl_version_string.h)
|
||||
if(NOT SCL_IS_SUBBUILD)
|
||||
message("-- scl_version_string.h is up-to-date.")
|
||||
endif(NOT SCL_IS_SUBBUILD)
|
||||
@@ -0,0 +1,25 @@
|
||||
# run_ctest.cmake
|
||||
# `ctest -S run_ctest.cmake`
|
||||
|
||||
set( CTEST_SOURCE_DIRECTORY . )
|
||||
set( CTEST_BINARY_DIRECTORY build_matrix )
|
||||
set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
|
||||
set( CTEST_MEMORYCHECK_COMMAND /usr/bin/valgrind )
|
||||
set( CTEST_INITIAL_CACHE "
|
||||
SITE:STRING=${CTEST_SITE}
|
||||
BUILDNAME:STRING=${CTEST_BUILD_NAME}
|
||||
SCL_ENABLE_TESTING:BOOL=ON
|
||||
SCL_BUILD_TYPE:STRING=Debug
|
||||
")
|
||||
|
||||
|
||||
ctest_start(matrix)
|
||||
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
|
||||
ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS -DSCL_ENABLE_TESTING=ON )
|
||||
ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" )
|
||||
message("running tests")
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "cpp_schema_....*" )
|
||||
|
||||
message("running python script")
|
||||
execute_process( COMMAND python ../misc/wiki-scripts/update-matrix.py
|
||||
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} )
|
||||
+86
-62
@@ -1,44 +1,18 @@
|
||||
SET(ap203_data
|
||||
ap203/203wseds.exp
|
||||
ap203/cube1.p21
|
||||
ap203/cube2.p21
|
||||
ap203/g_r_assembly1.p21
|
||||
ap203/gasket1.p21
|
||||
ap203/gasket2.p21
|
||||
ap203/gasket3.p21
|
||||
ap203/hex_prism1.p21
|
||||
ap203/rod_aspect1.p21
|
||||
ap203/star1.p21
|
||||
)
|
||||
INSTALL(FILES ${ap203_data} DESTINATION ${DATA_DIR}/data/ap203)
|
||||
|
||||
SET(ap227_data
|
||||
ap227/ap227.exp
|
||||
ap227/mitre.p21
|
||||
ap227/mitre.step.txt
|
||||
)
|
||||
INSTALL(FILES ${ap227_data} DESTINATION ${DATA_DIR}/data/ap227)
|
||||
|
||||
SET(step_example_data
|
||||
example/example.exp
|
||||
)
|
||||
INSTALL(FILES ${step_example_data} DESTINATION ${DATA_DIR}/data/example)
|
||||
|
||||
|
||||
|
||||
SET(step_datafiles
|
||||
pdmnet.exp
|
||||
select.exp
|
||||
)
|
||||
INSTALL(FILES ${step_datafiles} DESTINATION ${DATA_DIR}/data)
|
||||
#this sets a property so that the target doesn't get built by 'make' or 'make all'
|
||||
#useful when testing generation of schema code/compiling schem libs/etc
|
||||
FUNCTION( TESTABLE_TARGET target )
|
||||
if(SCL_ENABLE_TESTING)
|
||||
set_target_properties( ${target} PROPERTIES EXCLUDE_FROM_ALL ON )
|
||||
endif()
|
||||
ENDFUNCTION( TESTABLE_TARGET )
|
||||
|
||||
# To build one or more schemas, configure with
|
||||
# 'cmake -DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
|
||||
# 'cmake -DSCL_BUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
|
||||
|
||||
# This function runs fedex on one express file. The generated source goes in a dir
|
||||
# in the build dir, and it is compiled into a library. A p21read executable is
|
||||
# compiled and linked to the lib, unless DISABLE_P21READ is true. p21read is used
|
||||
# to test the lib.
|
||||
# compiled and linked to the lib. p21read is used to test the lib.
|
||||
FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
if( EXISTS "${CMAKE_BINARY_DIR}/${SCHEMA_FILE}" ) #try absolute path. if that fails, must already be absolute.
|
||||
set( SCHEMA_FILE "${CMAKE_BINARY_DIR}/${SCHEMA_FILE}" )
|
||||
@@ -57,51 +31,101 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
endif()
|
||||
|
||||
# read the schema name from a line like 'SCHEMA AUTOMOTIVE_DESIGN;'
|
||||
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "SCHEMA .*")
|
||||
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "^SCHEMA .*")
|
||||
string(REGEX REPLACE "^SCHEMA \(.*\)\;$" "\\1" SCHEMA_N ${SCHEMA_STATEMENT} )
|
||||
string(TOUPPER ${SCHEMA_N} SCHEMA_NAME) #fedex_plus always uses upper case for file names
|
||||
string(TOUPPER ${SCHEMA_N} SCHEMA_LONG_NAME) #fedex_plus always uses upper case for file names
|
||||
get_filename_component( SCHEMA_SN ${SCHEMA_FILE} NAME )
|
||||
string( REGEX REPLACE "\(.*\).[Ee][Xx][Pp]" "\\1" SCHEMA_SHORT_NAME ${SCHEMA_SN} )
|
||||
|
||||
project( sdai_${SCHEMA_NAME} )
|
||||
message( STATUS "Generating code for ${SCHEMA_NAME}.")
|
||||
set( SCHEMA_DIR ${CMAKE_BINARY_DIR}/${SCHEMA_NAME} )
|
||||
project( sdai_${SCHEMA_SHORT_NAME} )
|
||||
message( STATUS "Generating code for ${SCHEMA_SHORT_NAME}.")
|
||||
set( SCHEMA_OUTPUT_DIR ${CMAKE_BINARY_DIR}/${SCHEMA_SHORT_NAME} )
|
||||
|
||||
#the names of the files that will be generated
|
||||
set( FEDEX_OUT ${SCHEMA_DIR}/compstructs.cc ${SCHEMA_DIR}/Sdaiclasses.h
|
||||
${SCHEMA_DIR}/schema.cc ${SCHEMA_DIR}/Sdai${SCHEMA_NAME}.cc
|
||||
${SCHEMA_DIR}/schema.h ${SCHEMA_DIR}/Sdai${SCHEMA_NAME}.h
|
||||
${SCHEMA_DIR}/SdaiAll.cc ${SCHEMA_DIR}/Sdai${SCHEMA_NAME}.init.cc )
|
||||
set( FEDEX_OUT ${SCHEMA_OUTPUT_DIR}/compstructs.cc ${SCHEMA_OUTPUT_DIR}/Sdaiclasses.h
|
||||
${SCHEMA_OUTPUT_DIR}/schema.cc ${SCHEMA_OUTPUT_DIR}/Sdai${SCHEMA_LONG_NAME}.cc
|
||||
${SCHEMA_OUTPUT_DIR}/schema.h ${SCHEMA_OUTPUT_DIR}/Sdai${SCHEMA_LONG_NAME}.h
|
||||
${SCHEMA_OUTPUT_DIR}/SdaiAll.cc ${SCHEMA_OUTPUT_DIR}/Sdai${SCHEMA_LONG_NAME}.init.cc )
|
||||
|
||||
# *cannot* use include_directories() because the includes keep piling up - if building
|
||||
# multiple schemas, each one will use the include dirs from all previous schemas. Since
|
||||
# one header (schema.h) is always named the same, this will not work. only workaround
|
||||
# seems to be set_target_properties( <target> PROPERTIES COMPILE_FLAGS <flags> )
|
||||
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore -DHAVE_CONFIG_H" )
|
||||
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore -I${SCL_SOURCE_DIR}/src/base" )
|
||||
|
||||
add_custom_command( OUTPUT ${SCHEMA_DIR}
|
||||
COMMAND cmake ARGS -E make_directory ${SCHEMA_DIR}
|
||||
COMMENT "Creating ${SCHEMA_DIR} for schema ${SCHEMA_NAME}")
|
||||
add_custom_target( generate_cpp_${SCHEMA_SHORT_NAME} SOURCES ${FEDEX_OUT} )
|
||||
add_custom_command( OUTPUT ${SCHEMA_OUTPUT_DIR}
|
||||
COMMAND cmake ARGS -E make_directory ${SCHEMA_OUTPUT_DIR}
|
||||
COMMENT "Creating ${SCHEMA_OUTPUT_DIR} for schema ${SCHEMA_SHORT_NAME}")
|
||||
add_custom_command( OUTPUT ${FEDEX_OUT}
|
||||
COMMAND fedex_plus ARGS ${SCHEMA_FILE}
|
||||
DEPENDS ${SCHEMA_FILE} ${SCHEMA_DIR}
|
||||
WORKING_DIRECTORY ${SCHEMA_DIR}
|
||||
COMMENT "Running fedex_plus for ${SCHEMA_NAME}..."
|
||||
DEPENDS ${SCHEMA_FILE} ${SCHEMA_OUTPUT_DIR}
|
||||
WORKING_DIRECTORY ${SCHEMA_OUTPUT_DIR}
|
||||
COMMENT "Running fedex_plus for ${SCHEMA_SHORT_NAME}..."
|
||||
VERBATIM )
|
||||
if(MSVC OR BORLAND)
|
||||
add_definitions( -DSCL_SCHEMA_DLL_EXPORTS )
|
||||
add_definitions( -DSCL_BASE_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_EXPRESS_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_UTILS_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_DAI_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_CORE_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_EDITOR_DLL_IMPORTS )
|
||||
endif()
|
||||
add_library( ${PROJECT_NAME} SHARED ${FEDEX_OUT} )
|
||||
target_link_libraries(${PROJECT_NAME} stepdai stepcore express stepeditor )
|
||||
target_link_libraries(${PROJECT_NAME} stepdai stepcore express stepeditor steputils base )
|
||||
add_dependencies( ${PROJECT_NAME} generate_cpp_${SCHEMA_SHORT_NAME} )
|
||||
set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
|
||||
${${PROJECT_NAME}_COMPILE_FLAGS} )
|
||||
|
||||
if( NOT DEFINED ${DISABLE_P21READ} )
|
||||
add_executable( "p21read_${PROJECT_NAME}" ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc )
|
||||
target_link_libraries( p21read_${PROJECT_NAME} ${PROJECT_NAME} )
|
||||
set_target_properties( "p21read_${PROJECT_NAME}" PROPERTIES COMPILE_FLAGS
|
||||
${${PROJECT_NAME}_COMPILE_FLAGS} )
|
||||
if(APPLE)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
endif(APPLE)
|
||||
TESTABLE_TARGET( ${PROJECT_NAME} )
|
||||
|
||||
add_test( NAME generate_cpp_${SCHEMA_SHORT_NAME}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} --build .
|
||||
--target generate_cpp_${SCHEMA_SHORT_NAME}
|
||||
--config $<CONFIGURATION> )
|
||||
add_test( NAME build_cpp_${PROJECT_NAME}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} --build .
|
||||
--target p21read_${PROJECT_NAME}
|
||||
--config $<CONFIGURATION> )
|
||||
|
||||
# label the tests and set dependencies
|
||||
set_tests_properties( generate_cpp_${SCHEMA_SHORT_NAME} PROPERTIES LABELS cpp_schema_gen )
|
||||
set_tests_properties( build_cpp_${PROJECT_NAME} PROPERTIES DEPENDS generate_cpp_${SCHEMA_SHORT_NAME} LABELS cpp_schema_build )
|
||||
|
||||
if(MSVC OR BORLAND)
|
||||
add_executable( p21read_${PROJECT_NAME} ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc ${SCL_SOURCE_DIR}/src/fedex_plus/xgetopt.cc )
|
||||
else()
|
||||
add_executable( p21read_${PROJECT_NAME} ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc )
|
||||
endif()
|
||||
add_dependencies( p21read_${PROJECT_NAME} version_string )
|
||||
target_link_libraries( p21read_${PROJECT_NAME} ${PROJECT_NAME} )
|
||||
set_target_properties( p21read_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
|
||||
${${PROJECT_NAME}_COMPILE_FLAGS} )
|
||||
TESTABLE_TARGET( p21read_${PROJECT_NAME} )
|
||||
|
||||
#find all part 21 files in schema dir, add a test for each one
|
||||
get_filename_component( SCHEMA_DIR ${SCHEMA_FILE} PATH )
|
||||
file( GLOB_RECURSE P21_FILES ${SCHEMA_DIR}/*.stp ${SCHEMA_DIR}/*.step ${SCHEMA_DIR}/*.p21 )
|
||||
foreach( TEST_FILE ${P21_FILES} )
|
||||
get_filename_component( FNAME ${TEST_FILE} NAME_WE )
|
||||
add_test( NAME read_write_cpp_${SCHEMA_SHORT_NAME}_${FNAME}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND p21read_${PROJECT_NAME} ${TEST_FILE} )
|
||||
set_tests_properties( read_write_cpp_${SCHEMA_SHORT_NAME}_${FNAME} PROPERTIES DEPENDS build_cpp_${PROJECT_NAME} LABELS cpp_schema_rw )
|
||||
endforeach()
|
||||
|
||||
ENDFUNCTION(BUILD_A_SCHEMA)
|
||||
|
||||
if(NOT BUILD_SCHEMAS STREQUAL "" )
|
||||
foreach( ap ${BUILD_SCHEMAS} )
|
||||
BUILD_A_SCHEMA( ${ap} )
|
||||
endforeach()
|
||||
if( DEFINED SCL_BUILD_SCHEMAS )
|
||||
if( SCL_BUILD_SCHEMAS STREQUAL "ALL" )
|
||||
file( GLOB_RECURSE SCL_BUILD_SCHEMAS ${SCL_SOURCE_DIR}/data/*.exp )
|
||||
endif()
|
||||
foreach( ap ${SCL_BUILD_SCHEMAS} )
|
||||
BUILD_A_SCHEMA( ${ap} )
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+13
@@ -0,0 +1,13 @@
|
||||
data/ directory README
|
||||
|
||||
Layout
|
||||
------
|
||||
Each directory
|
||||
- must contain exactly one EXPRESS schema
|
||||
-- this schema must be useful to end users - i.e. not a schema crafted to test SCL
|
||||
- must be named after the numeric designation of the schema *if and only if*
|
||||
it is an IS STEP schema
|
||||
-- examples: ap214e3, AP235, etc (case insensitive)
|
||||
-- directories for schemas that are not STEP IS must be named differently
|
||||
- may contain part 21 files
|
||||
-- these files must be compatible with the schema
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Executable
+4856
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Executable → Regular
+12200
-11881
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
+12
-5
@@ -1,7 +1,14 @@
|
||||
SET(scl_MANS
|
||||
man/man1/dataprobe.1
|
||||
man/man1/fedex.1
|
||||
man/man1/fedex_plus.1
|
||||
man/man1/mkProbe.1
|
||||
man/man1/dataprobe.1
|
||||
man/man1/fedex.1
|
||||
man/man1/fedex_plus.1
|
||||
man/man1/mkProbe.1
|
||||
)
|
||||
INSTALL(FILES ${scl_MANS} DESTINATION ${MAN_DIR}/man1)
|
||||
|
||||
if(NOT DEFINED MAN_DIR)
|
||||
set(MAN_DIR share/man)
|
||||
endif(NOT DEFINED MAN_DIR)
|
||||
|
||||
IF(NOT WIN32)
|
||||
INSTALL(FILES ${scl_MANS} DESTINATION ${CMAKE_INSTALL_PREFIX}/${MAN_DIR}/man1)
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user