Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Common build directories used in the source tree
/build
/build-*
/.build


# Temporary files
*~
\#*\#
Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Installation
-DSC_BUILD_SCHEMAS=ALL
- Added to make use of ctest easier. If SC_BUILD_SCHEMAS == ALL,
then CMake adds each *.exp file found in data/.
-DSC_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=Release
- this causes binaries to be built without debugging information
- without this, cmake defaults to a Debug build

Expand Down
8 changes: 4 additions & 4 deletions cmake/SC_CXX_schema_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ macro(SCHEMA_TARGETS expFile schemaName sourceFiles)
${SC_SOURCE_DIR}/src/clutils ${SC_SOURCE_DIR}/src/clstepcore ${SC_SOURCE_DIR}/src/cllazyfile
${SC_SOURCE_DIR}/src/cllazyfile/judy/src
)
# if testing is enabled, "TESTABLE" sets property EXCLUDE_FROM_ALL and prevents installation
# Schema libraries should be installed by default
if(BUILD_SHARED_LIBS)
SC_ADDLIB(${PROJECT_NAME} SHARED SOURCES ${sourceFiles} LINK_LIBRARIES stepdai stepcore stepeditor steputils TESTABLE)
SC_ADDLIB(${PROJECT_NAME} SHARED SOURCES ${sourceFiles} LINK_LIBRARIES stepdai stepcore stepeditor steputils)
add_dependencies(${PROJECT_NAME} generate_cpp_${PROJECT_NAME})
if(WIN32)
target_compile_definitions("${PROJECT_NAME}" PRIVATE SC_SCHEMA_DLL_EXPORTS)
Expand All @@ -110,8 +110,8 @@ macro(SCHEMA_TARGETS expFile schemaName sourceFiles)
endif()
endif()

if($CACHE{SC_BUILD_STATIC_LIBS})
SC_ADDLIB(${PROJECT_NAME}-static STATIC SOURCES ${sourceFiles} LINK_LIBRARIES stepdai-static stepcore-static stepeditor-static steputils-static TESTABLE)
if(BUILD_STATIC_LIBS)
SC_ADDLIB(${PROJECT_NAME}-static STATIC SOURCES ${sourceFiles} LINK_LIBRARIES stepdai-static stepcore-static stepeditor-static steputils-static)
add_dependencies(${PROJECT_NAME}-static generate_cpp_${PROJECT_NAME})
target_compile_definitions("${PROJECT_NAME}-static" PRIVATE SC_STATIC)
if(MSVC)
Expand Down
2 changes: 1 addition & 1 deletion ctest_matrix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(CTEST_INITIAL_CACHE "
SITE:STRING=${CTEST_SITE}
BUILDNAME:STRING=${CTEST_BUILD_NAME}
SC_ENABLE_TESTING:BOOL=ON
SC_BUILD_TYPE:STRING=Debug
CMAKE_BUILD_TYPE:STRING=Debug
")


Expand Down
1 change: 0 additions & 1 deletion example/ap203min/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ set(SC_IS_SUBBUILD TRUE)
if(NOT DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif(NOT DEFINED CMAKE_BUILD_TYPE)
set(SC_BUILD_TYPE ${CMAKE_BUILD_TYPE})

# Path to STEPcode
set(STEPCODE_BUILD_DIR ${CMAKE_BINARY_DIR}/sc CACHE PATH "STEPcode build subdir")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ ExternalProject_Add( STEPCODE
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DSC_BUILD_TYPE=Debug
-DCMAKE_BUILD_TYPE=Debug
-DSC_BUILD_SCHEMAS=ap203/ap203.exp
-DSC_BUILD_STATIC_LIBS=ON
-DBUILD_STATIC_LIBS=ON
-DSC_PYTHON_GENERATOR=OFF
-DSC_INSTALL_PREFIX:PATH=<INSTALL_DIR>
)
Expand Down
2 changes: 1 addition & 1 deletion lcov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BUILDNAME:STRING=${CTEST_BUILD_NAME}
SC_ENABLE_TESTING:BOOL=ON
SC_ENABLE_COVERAGE:BOOL=ON
SC_BUILD_SCHEMAS:STRING=ALL
SC_BUILD_TYPE:STRING=Debug
CMAKE_BUILD_TYPE:STRING=Debug
")

set(LCOV_OUT "${CTEST_BINARY_DIRECTORY}/lcov_html")
Expand Down
2 changes: 1 addition & 1 deletion run_ctest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(CTEST_INITIAL_CACHE "
SITE:STRING=${CTEST_SITE}
BUILDNAME:STRING=${CTEST_BUILD_NAME}
SC_ENABLE_TESTING:BOOL=ON
SC_BUILD_TYPE:STRING=Debug
CMAKE_BUILD_TYPE:STRING=Debug
")


Expand Down
6 changes: 5 additions & 1 deletion src/exp2cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ include_directories(
${SC_SOURCE_DIR}/include/express
)

SC_ADDEXEC(exp2cxx SOURCES ${exp2cxx_SOURCES} LINK_LIBRARIES libexppp express)
if(BUILD_SHARED_LIBS)
SC_ADDEXEC(exp2cxx SOURCES ${exp2cxx_SOURCES} LINK_LIBRARIES libexppp express)
else()
SC_ADDEXEC(exp2cxx SOURCES ${exp2cxx_SOURCES} LINK_LIBRARIES libexppp-static express-static)
endif()

if(SC_ENABLE_TESTING)
add_subdirectory(test)
Expand Down
6 changes: 5 additions & 1 deletion src/exp2python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ if(SC_PYTHON_GENERATOR)
../exp2cxx/write.cc
../exp2cxx/print.cc
)
SC_ADDEXEC(exp2python SOURCES ${exp2python_SOURCES} LINK_LIBRARIES express)
if(BUILD_SHARED_LIBS)
SC_ADDEXEC(exp2python SOURCES ${exp2python_SOURCES} LINK_LIBRARIES express)
else()
SC_ADDEXEC(exp2python SOURCES ${exp2python_SOURCES} LINK_LIBRARIES express-static)
endif()

endif(SC_PYTHON_GENERATOR)

Expand Down
6 changes: 5 additions & 1 deletion src/exppp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ if(BUILD_STATIC_LIBS)
set_target_properties(libexppp-static PROPERTIES PREFIX "")
endif()

SC_ADDEXEC(exppp SOURCES ${EXPPP_SOURCES} LINK_LIBRARIES libexppp express)
if(BUILD_SHARED_LIBS)
SC_ADDEXEC(exppp SOURCES ${EXPPP_SOURCES} LINK_LIBRARIES libexppp express)
else()
SC_ADDEXEC(exppp SOURCES ${EXPPP_SOURCES} LINK_LIBRARIES libexppp-static express-static)
endif()

if(SC_ENABLE_TESTING)
add_subdirectory(test)
Expand Down
Loading