mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Building process changes
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
/deps*/
|
/deps*/
|
||||||
/build*/
|
/build*/
|
||||||
/install*/
|
/install*/
|
||||||
|
/_build-vs2017-x64
|
||||||
|
/_deps
|
||||||
|
/_deps-vs2017-x64-installed
|
||||||
/win/BuildDepsCache*.txt
|
/win/BuildDepsCache*.txt
|
||||||
# IfcExpressParser residue
|
# IfcExpressParser residue
|
||||||
/src/ifcexpressparser/express_parser.py
|
/src/ifcexpressparser/express_parser.py
|
||||||
|
|||||||
+18
-13
@@ -116,6 +116,9 @@ UNIFY_ENVVARS_AND_CACHE(PCRE_LIBRARY_DIR)
|
|||||||
UNIFY_ENVVARS_AND_CACHE(PYTHON_EXECUTABLE)
|
UNIFY_ENVVARS_AND_CACHE(PYTHON_EXECUTABLE)
|
||||||
UNIFY_ENVVARS_AND_CACHE(HDF5_INCLUDE_DIR)
|
UNIFY_ENVVARS_AND_CACHE(HDF5_INCLUDE_DIR)
|
||||||
UNIFY_ENVVARS_AND_CACHE(HDF5_LIBRARY_DIR)
|
UNIFY_ENVVARS_AND_CACHE(HDF5_LIBRARY_DIR)
|
||||||
|
UNIFY_ENVVARS_AND_CACHE(BOOST_ROOT)
|
||||||
|
UNIFY_ENVVARS_AND_CACHE(BOOST_INCLUDE)
|
||||||
|
UNIFY_ENVVARS_AND_CACHE(BOOST_LIBRARYDIR)
|
||||||
|
|
||||||
if (GLTF_SUPPORT AND BUILD_CONVERT)
|
if (GLTF_SUPPORT AND BUILD_CONVERT)
|
||||||
UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR)
|
UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR)
|
||||||
@@ -145,7 +148,7 @@ ENDMACRO()
|
|||||||
# runtime, when doing running conda-build we pick what conda prepared for us.
|
# runtime, when doing running conda-build we pick what conda prepared for us.
|
||||||
IF(WIN32 AND ("$ENV{CONDA_BUILD}" STREQUAL ""))
|
IF(WIN32 AND ("$ENV{CONDA_BUILD}" STREQUAL ""))
|
||||||
SET(Boost_USE_STATIC_LIBS ON)
|
SET(Boost_USE_STATIC_LIBS ON)
|
||||||
SET(Boost_USE_STATIC_RUNTIME ON)
|
SET(Boost_USE_STATIC_RUNTIME OFF)
|
||||||
SET(Boost_USE_MULTITHREADED ON)
|
SET(Boost_USE_MULTITHREADED ON)
|
||||||
# Disable Boost's autolinking as the libraries to be linked to are supplied
|
# Disable Boost's autolinking as the libraries to be linked to are supplied
|
||||||
# already by CMake, and wrong libraries would be asked for when code is
|
# already by CMake, and wrong libraries would be asked for when code is
|
||||||
@@ -185,6 +188,8 @@ FIND_PACKAGE(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
|||||||
MESSAGE(STATUS "Boost include files found in ${Boost_INCLUDE_DIRS}")
|
MESSAGE(STATUS "Boost include files found in ${Boost_INCLUDE_DIRS}")
|
||||||
MESSAGE(STATUS "Boost libraries found in ${Boost_LIBRARY_DIRS}")
|
MESSAGE(STATUS "Boost libraries found in ${Boost_LIBRARY_DIRS}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# set(SOME_LIRARIES foo bar)
|
# set(SOME_LIRARIES foo bar)
|
||||||
# add_debug_variants(SOME_LIRARIES "${SOME_LIRARIES}" d)
|
# add_debug_variants(SOME_LIRARIES "${SOME_LIRARIES}" d)
|
||||||
@@ -460,18 +465,18 @@ IF(MSVC)
|
|||||||
endif()
|
endif()
|
||||||
# Link against the static VC runtime
|
# Link against the static VC runtime
|
||||||
# TODO Make this configurable
|
# TODO Make this configurable
|
||||||
IF("$ENV{CONDA_BUILD}" STREQUAL "")
|
# IF("$ENV{CONDA_BUILD}" STREQUAL "")
|
||||||
FOREACH(flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL
|
# FOREACH(flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL
|
||||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
# CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
# CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||||
IF(${flag} MATCHES "/MD")
|
# IF(${flag} MATCHES "/MD")
|
||||||
STRING(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
|
# STRING(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
|
||||||
ENDIF()
|
# ENDIF()
|
||||||
IF(${flag} MATCHES "/MDd")
|
# IF(${flag} MATCHES "/MDd")
|
||||||
STRING(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}")
|
# STRING(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}")
|
||||||
ENDIF()
|
# ENDIF()
|
||||||
ENDFOREACH()
|
# ENDFOREACH()
|
||||||
ENDIF()
|
# ENDIF()
|
||||||
ElSE()
|
ElSE()
|
||||||
add_definitions(-Wall -Wextra)
|
add_definitions(-Wall -Wextra)
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
|||||||
+4
-4
@@ -236,7 +236,7 @@ cd "%DEPENDENCY_DIR%"
|
|||||||
call cecho.cmd 0 13 "Building %DEPENDENCY_NAME% %BOOST_LIBS% Please be patient, this will take a while."
|
call cecho.cmd 0 13 "Building %DEPENDENCY_NAME% %BOOST_LIBS% Please be patient, this will take a while."
|
||||||
IF EXIST "%DEPENDENCY_DIR%\bin.v2\project-cache.jam" del "%DEPS_DIR%\boost\bin.v2\project-cache.jam"
|
IF EXIST "%DEPENDENCY_DIR%\bin.v2\project-cache.jam" del "%DEPS_DIR%\boost\bin.v2\project-cache.jam"
|
||||||
|
|
||||||
call .\b2 toolset=%BOOST_TOOLSET% runtime-link=static address-model=%ARCH_BITS% -j%IFCOS_NUM_BUILD_PROCS% ^
|
call .\b2 toolset=%BOOST_TOOLSET% runtime-link=shared address-model=%ARCH_BITS% -j%IFCOS_NUM_BUILD_PROCS% ^
|
||||||
variant=%DEBUG_OR_RELEASE_LOWERCASE% %BOOST_WIN_API% %BOOST_LIBS% stage --stagedir=stage/%GEN_SHORTHAND%
|
variant=%DEBUG_OR_RELEASE_LOWERCASE% %BOOST_WIN_API% %BOOST_LIBS% stage --stagedir=stage/%GEN_SHORTHAND%
|
||||||
|
|
||||||
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
||||||
@@ -262,7 +262,7 @@ IF NOT %ERRORLEVEL%==0 git apply --reject --whitespace=fix "%~dp0patches\OpenCOL
|
|||||||
:: uncomment to following line in order to delete the CMakeCache.txt always if experiencing problems.
|
:: uncomment to following line in order to delete the CMakeCache.txt always if experiencing problems.
|
||||||
REM IF EXIST "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt". del "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt"
|
REM IF EXIST "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt". del "%DEPENDENCY_DIR%\%BUILD_DIR%\CMakeCache.txt"
|
||||||
:: NOTE Enforce that the embedded LibXml2 and PCRE are used as there might be problems with arbitrary versions of the libraries.
|
:: NOTE Enforce that the embedded LibXml2 and PCRE are used as there might be problems with arbitrary versions of the libraries.
|
||||||
call :RunCMake -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%\OpenCOLLADA" -DUSE_STATIC_MSVC_RUNTIME=1 -DCMAKE_DEBUG_POSTFIX=d ^
|
call :RunCMake -DCMAKE_INSTALL_PREFIX="%INSTALL_DIR%\OpenCOLLADA" -DUSE_STATIC_MSVC_RUNTIME=0 -DCMAKE_DEBUG_POSTFIX=d ^
|
||||||
-DLIBXML2_LIBRARIES="" -DLIBXML2_INCLUDE_DIR="" -DPCRE_INCLUDE_DIR="" -DPCRE_LIBRARIES=""
|
-DLIBXML2_LIBRARIES="" -DLIBXML2_INCLUDE_DIR="" -DPCRE_INCLUDE_DIR="" -DPCRE_LIBRARIES=""
|
||||||
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
||||||
REM IF NOT EXIST "%DEPS_DIR%\OpenCOLLADA\%BUILD_DIR%\lib\%DEBUG_OR_RELEASE%\OpenCOLLADASaxFrameworkLoader.lib".
|
REM IF NOT EXIST "%DEPS_DIR%\OpenCOLLADA\%BUILD_DIR%\lib\%DEBUG_OR_RELEASE%\OpenCOLLADASaxFrameworkLoader.lib".
|
||||||
@@ -309,7 +309,7 @@ if not %ERRORLEVEL%==0 goto :Error
|
|||||||
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL
|
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL
|
||||||
if not %ERRORLEVEL%==0 (
|
if not %ERRORLEVEL%==0 (
|
||||||
pushd "%DEPENDENCY_DIR%"
|
pushd "%DEPENDENCY_DIR%"
|
||||||
git apply --ignore-whitespace ""%~dp0patches\%OCCT_VER%.patch"
|
git reset --hard --ignore-whitespace ""%~dp0patches\%OCCT_VER%.patch"
|
||||||
popd
|
popd
|
||||||
)
|
)
|
||||||
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL
|
findstr IfcOpenShell "%DEPENDENCY_DIR%\CMakeLists.txt">NUL
|
||||||
@@ -371,7 +371,7 @@ cd "%DEPENDENCY_DIR%"
|
|||||||
:: NOTE Specify OCE_NO_LIBRARY_VERSION as rc.exe can fail due to long filenames and huge command-line parameter
|
:: NOTE Specify OCE_NO_LIBRARY_VERSION as rc.exe can fail due to long filenames and huge command-line parameter
|
||||||
:: input (more than 32,000 characters). Could maybe try using subst for the build dir to overcome this.
|
:: input (more than 32,000 characters). Could maybe try using subst for the build dir to overcome this.
|
||||||
call :RunCMake -DOCE_BUILD_SHARED_LIB=0 -DOCE_INSTALL_PREFIX="%INSTALL_DIR%\oce" -DOCE_TESTING=0 ^
|
call :RunCMake -DOCE_BUILD_SHARED_LIB=0 -DOCE_INSTALL_PREFIX="%INSTALL_DIR%\oce" -DOCE_TESTING=0 ^
|
||||||
-DOCE_NO_LIBRARY_VERSION=1 -DOCE_USE_STATIC_MSVC_RUNTIME=1
|
-DOCE_NO_LIBRARY_VERSION=1 -DOCE_USE_STATIC_MSVC_RUNTIME=0
|
||||||
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
||||||
call :BuildSolution "%DEPENDENCY_DIR%\%BUILD_DIR%\OCE.sln" %BUILD_CFG%
|
call :BuildSolution "%DEPENDENCY_DIR%\%BUILD_DIR%\OCE.sln" %BUILD_CFG%
|
||||||
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
IF NOT %ERRORLEVEL%==0 GOTO :Error
|
||||||
|
|||||||
Reference in New Issue
Block a user