File tree Expand file tree Collapse file tree 11 files changed +27
-14
lines changed
ExternalProjectBuild/cmake Expand file tree Collapse file tree 11 files changed +27
-14
lines changed Original file line number Diff line number Diff line change 11# Common build directories used in the source tree
22/build
3+ /build- *
34/.build
45
6+
57# Temporary files
68* ~
79\# * \#
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ Installation
5151 -DSC_BUILD_SCHEMAS=ALL
5252 - Added to make use of ctest easier. If SC_BUILD_SCHEMAS == ALL,
5353 then CMake adds each *.exp file found in data/.
54- -DSC_BUILD_TYPE =Release
54+ -DCMAKE_BUILD_TYPE =Release
5555 - this causes binaries to be built without debugging information
5656 - without this, cmake defaults to a Debug build
5757
Original file line number Diff line number Diff line change @@ -92,9 +92,9 @@ macro(SCHEMA_TARGETS expFile schemaName sourceFiles)
9292 ${SC_SOURCE_DIR} /src/clutils ${SC_SOURCE_DIR} /src/clstepcore ${SC_SOURCE_DIR} /src/cllazyfile
9393 ${SC_SOURCE_DIR} /src/cllazyfile/judy/src
9494 )
95- # if testing is enabled, " TESTABLE " sets property EXCLUDE_FROM_ALL and prevents installation
95+ # Schema libraries should be installed by default
9696 if(BUILD_SHARED_LIBS)
97- SC_ADDLIB(${PROJECT_NAME} SHARED SOURCES ${sourceFiles} LINK_LIBRARIES stepdai stepcore stepeditor steputils TESTABLE )
97+ SC_ADDLIB(${PROJECT_NAME} SHARED SOURCES ${sourceFiles} LINK_LIBRARIES stepdai stepcore stepeditor steputils)
9898 add_dependencies(${PROJECT_NAME} generate_cpp_${PROJECT_NAME} )
9999 if(WIN32)
100100 target_compile_definitions(" ${PROJECT_NAME} " PRIVATE SC_SCHEMA_DLL_EXPORTS)
@@ -110,8 +110,8 @@ macro(SCHEMA_TARGETS expFile schemaName sourceFiles)
110110 endif()
111111 endif()
112112
113- if($CACHE{SC_BUILD_STATIC_LIBS} )
114- SC_ADDLIB(${PROJECT_NAME} -static STATIC SOURCES ${sourceFiles} LINK_LIBRARIES stepdai-static stepcore-static stepeditor-static steputils-static TESTABLE )
113+ if(BUILD_STATIC_LIBS )
114+ SC_ADDLIB(${PROJECT_NAME} -static STATIC SOURCES ${sourceFiles} LINK_LIBRARIES stepdai-static stepcore-static stepeditor-static steputils-static)
115115 add_dependencies(${PROJECT_NAME} -static generate_cpp_${PROJECT_NAME} )
116116 target_compile_definitions(" ${PROJECT_NAME} -static " PRIVATE SC_STATIC)
117117 if(MSVC)
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ set(CTEST_INITIAL_CACHE "
99SITE:STRING=${CTEST_SITE}
1010BUILDNAME:STRING=${CTEST_BUILD_NAME}
1111SC_ENABLE_TESTING:BOOL=ON
12- SC_BUILD_TYPE :STRING=Debug
12+ CMAKE_BUILD_TYPE :STRING=Debug
1313" )
1414
1515
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ set(SC_IS_SUBBUILD TRUE)
3131if (NOT DEFINED CMAKE_BUILD_TYPE )
3232 set (CMAKE_BUILD_TYPE Debug)
3333endif (NOT DEFINED CMAKE_BUILD_TYPE )
34- set (SC_BUILD_TYPE ${CMAKE_BUILD_TYPE} )
3534
3635# Path to STEPcode
3736set (STEPCODE_BUILD_DIR ${CMAKE_BINARY_DIR} /sc CACHE PATH "STEPcode build subdir" )
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ ExternalProject_Add( STEPCODE
44 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
55 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
66 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
7- -DSC_BUILD_TYPE =Debug
7+ -DCMAKE_BUILD_TYPE =Debug
88 -DSC_BUILD_SCHEMAS=ap203/ap203.exp
9- -DSC_BUILD_STATIC_LIBS =ON
9+ -DBUILD_STATIC_LIBS =ON
1010 -DSC_PYTHON_GENERATOR=OFF
1111 -DSC_INSTALL_PREFIX:PATH=<INSTALL_DIR >
1212)
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ BUILDNAME:STRING=${CTEST_BUILD_NAME}
1515SC_ENABLE_TESTING:BOOL=ON
1616SC_ENABLE_COVERAGE:BOOL=ON
1717SC_BUILD_SCHEMAS:STRING=ALL
18- SC_BUILD_TYPE :STRING=Debug
18+ CMAKE_BUILD_TYPE :STRING=Debug
1919" )
2020
2121set (LCOV_OUT "${CTEST_BINARY_DIRECTORY} /lcov_html" )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ set(CTEST_INITIAL_CACHE "
99SITE:STRING=${CTEST_SITE}
1010BUILDNAME:STRING=${CTEST_BUILD_NAME}
1111SC_ENABLE_TESTING:BOOL=ON
12- SC_BUILD_TYPE :STRING=Debug
12+ CMAKE_BUILD_TYPE :STRING=Debug
1313" )
1414
1515
Original file line number Diff line number Diff line change @@ -38,7 +38,11 @@ include_directories(
3838 ${SC_SOURCE_DIR} /include/express
3939 )
4040
41- SC_ADDEXEC (exp2cxx SOURCES ${exp2cxx_SOURCES} LINK_LIBRARIES libexppp express )
41+ if (BUILD_SHARED_LIBS )
42+ SC_ADDEXEC (exp2cxx SOURCES ${exp2cxx_SOURCES} LINK_LIBRARIES libexppp express )
43+ else ()
44+ SC_ADDEXEC (exp2cxx SOURCES ${exp2cxx_SOURCES} LINK_LIBRARIES libexppp-static express-static )
45+ endif ()
4246
4347if (SC_ENABLE_TESTING)
4448 add_subdirectory (test )
Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ if(SC_PYTHON_GENERATOR)
2828 ../exp2cxx/write.cc
2929 ../exp2cxx/print.cc
3030 )
31- SC_ADDEXEC (exp2python SOURCES ${exp2python_SOURCES} LINK_LIBRARIES express )
31+ if (BUILD_SHARED_LIBS )
32+ SC_ADDEXEC (exp2python SOURCES ${exp2python_SOURCES} LINK_LIBRARIES express )
33+ else ()
34+ SC_ADDEXEC (exp2python SOURCES ${exp2python_SOURCES} LINK_LIBRARIES express-static )
35+ endif ()
3236
3337endif (SC_PYTHON_GENERATOR )
3438
You can’t perform that action at this time.
0 commit comments