diff options
author | Manish Upadhyay <maupadhy@manishs-mbp-2.corp.adobe.com> | 2022-02-28 17:40:01 +0530 |
---|---|---|
committer | Manish Upadhyay <maupadhy@manishs-mbp-2.corp.adobe.com> | 2022-02-28 17:40:01 +0530 |
commit | 54a12ef2284c530bfc9ea9db216ac427e8486de1 (patch) | |
tree | 06fe5e0286ecd4733408ade95bbe09a7365b4ff9 /build | |
parent | a3c578859d0c6f6388059f7d6667a266647ef612 (diff) |
Compiler upgrade
Diffstat (limited to 'build')
-rwxr-xr-x | build/GenerateXMPToolkitSDK_win.bat | 14 | ||||
-rw-r--r-- | build/ProductConfig.cmake | 20 | ||||
-rwxr-xr-x | build/shared/CMakeUtils.bat | 28 | ||||
-rw-r--r-- | build/shared/CMakeUtils.sh | 6 | ||||
-rw-r--r-- | build/shared/SharedConfig_Common.cmake | 13 | ||||
-rw-r--r-- | build/shared/ToolchainLLVM.cmake | 7 |
6 files changed, 30 insertions, 58 deletions
diff --git a/build/GenerateXMPToolkitSDK_win.bat b/build/GenerateXMPToolkitSDK_win.bat index 16fed83..338f359 100755 --- a/build/GenerateXMPToolkitSDK_win.bat +++ b/build/GenerateXMPToolkitSDK_win.bat @@ -37,7 +37,7 @@ set GENERATE_ALL=On :32DLL echo "Generating XMPSDKToolkit Dynamic Win32" -set VS_VERSION=2017 +set VS_VERSION=2019 set BUILD_TYPE=Dynamic set BITS=32 IF "%GENERATE_ALL%"=="On" ( @@ -48,7 +48,7 @@ GOTO GenerateNow :32LIB echo "Generating XMPSDKToolkit Static Win32" -set VS_VERSION=2017 +set VS_VERSION=2019 set BUILD_TYPE=Static set BITS=32 IF "%GENERATE_ALL%"=="On" ( @@ -58,7 +58,7 @@ GOTO GenerateNow :64DLL echo "Generating XMPSDKToolkit Dynamic x64" -set VS_VERSION=2017 +set VS_VERSION=2019 set BUILD_TYPE=Dynamic set BITS=64 IF "%GENERATE_ALL%"=="On" ( @@ -68,7 +68,7 @@ GOTO GenerateNow :64LIB echo "Generating XMPSDKToolkit Static x64" -set VS_VERSION=2017 +set VS_VERSION=2019 set BUILD_TYPE=Static set BITS=64 IF "%GENERATE_ALL%"=="On" ( @@ -94,9 +94,9 @@ exit /B 0 :CLEANALL echo "Cleaning..." -if exist vc15 rmdir /S /Q vc15 -if exist ..\XMPCore\build\vc15 rmdir /S /Q ..\XMPCore\build\vc15 -if exist ..\XMPFiles\build\vc15 rmdir /S /Q ..\XMPFiles\build\vc15 +if exist vc16 rmdir /S /Q vc16 +if exist ..\XMPCore\build\vc16 rmdir /S /Q ..\XMPCore\build\vc16 +if exist ..\XMPFiles\build\vc16 rmdir /S /Q ..\XMPFiles\build\vc16 if exist ..\public\libraries\windows rmdir /S /Q ..\public\libraries\windows if exist ..\public\libraries\windows_x64 rmdir /S /Q ..\public\libraries\windows_x64 echo "Done" diff --git a/build/ProductConfig.cmake b/build/ProductConfig.cmake index f207c7d..3f51fa6 100644 --- a/build/ProductConfig.cmake +++ b/build/ProductConfig.cmake @@ -18,10 +18,10 @@ endif(ANDROID) # ============================================================================== # Product Config for XMP Toolkit # ============================================================================== + if (UNIX) if (APPLE) set(XMP_ENABLE_SECURE_SETTINGS "ON") - if (APPLE_IOS) set(XMP_PLATFORM_SHORT "ios") if(XMP_BUILD_STATIC) @@ -40,11 +40,8 @@ if (UNIX) else () set(XMP_PLATFORM_SHORT "mac") if(CMAKE_CL_64) - set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE) + set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)" CACHE STRING "Build architectures for OSX" FORCE) add_definitions(-DXMP_64=1) - else(CMAKE_CL_64) - set(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "Build architectures for OSX" FORCE) - add_definitions(-DXMP_64=0) endif(CMAKE_CL_64) # is SDK and deployment target set? @@ -80,20 +77,11 @@ if (UNIX) if(CMAKE_CL_64) set(XMP_BITDEPTH "64") if(CMAKE_LIBCPP) - set(XMP_CPU_FOLDERNAME "intel_64_libcpp") - else() - set(XMP_CPU_FOLDERNAME "intel_64") - endif() - else() - set(XMP_BITDEPTH "32") - if(CMAKE_LIBCPP) - set(XMP_CPU_FOLDERNAME "intel_libcpp") - else() - set(XMP_CPU_FOLDERNAME "intel") + set(XMP_CPU_FOLDERNAME "universal") endif() endif() endif() - + # XMP_PLATFORM_FOLDER is used in OUTPUT_DIR and Debug/Release get automatically added for VS/XCode projects if(APPLE_IOS) set(XMP_PLATFORM_FOLDER "ios/${XMP_CPU_FOLDERNAME}") diff --git a/build/shared/CMakeUtils.bat b/build/shared/CMakeUtils.bat index d272400..3dae202 100755 --- a/build/shared/CMakeUtils.bat +++ b/build/shared/CMakeUtils.bat @@ -8,7 +8,7 @@ REM Available Arguments: REM [64|32] Bit Architecture (optional, 64 is default) -REM [2008|2011|2011|2015] VS Version(optional, 2017 is default) +REM [2008|2011|2011|2015|2017] VS Version(optional, 2019 is default) REM [Dynamic | Static] optional, Dynamic by default REM [WarningAsError] optional REM [Clean] optional @@ -22,8 +22,8 @@ set CleanCMake=OFF set XMPROOT=%buildSharedLoc%/../.. :: Default Generator -set GeneratorVersion=Visual Studio 15 2017 -set GeneratorArchitecture=Win64 +set GeneratorVersion=Visual Studio 16 2019 +set GeneratorArchitecture=x64 set CMake_Arch64Bit=ON set CMake_ARCH=x64 @@ -59,9 +59,9 @@ set CMake_LibTypeFolderName=dynamic ) :: Visual Studio Version - if /I "%1"=="2017" ( - echo "Generator VS 2017 specified" - set GeneratorVersion=Visual Studio 15 2017 + if /I "%1"=="2019" ( + echo "Generator VS 2019 specified" + set GeneratorVersion=Visual Studio 16 2019 set CMakeGenVersion_FolderSuffix= ) @@ -94,18 +94,10 @@ set CMake64_Folder_Suffix= ) :: CMake Folder specified: -set CMakeFolder="vc15/%CMake_LibTypeFolderName%/windows%CMake64_Folder_Suffix%" +set CMakeFolder="vc16/%CMake_LibTypeFolderName%/windows%CMake64_Folder_Suffix%" echo CMakeFolder: %CMakeFolder% -:: Create generator type from VS version and architecture -if "%GeneratorArchitecture%"=="Win32" ( -::32 Bit has no generator argument -set GENERATOR=%GeneratorVersion% -) else ( -:: Is ARM or Win64 -set GENERATOR=%GeneratorVersion% %GeneratorArchitecture% -) -echo Generator used: %GENERATOR% +echo Generator used: %GeneratorVersion% :: Delete old cmake folder on "clean" if "%CleanCMake%"=="ON" ( @@ -115,8 +107,8 @@ if exist %CMakeFolder% rmdir /S /Q %CMakeFolder% mkdir %CMakeFolder% cd %CMakeFolder% -echo cmake ../../../. -G"%GENERATOR%" -DXMP_CMAKEFOLDER_NAME="%CMakeFolder%" -DCMAKE_CL_64=%CMake_Arch64Bit% -DCMAKE_ARCH=%CMake_ARCH% -DXMP_BUILD_WARNING_AS_ERROR=%CMake_Build_Warning_As_Error% -DXMP_BUILD_STATIC="%CMake_BuildStatic%" -cmake ../../../. -G"%GENERATOR%" -DXMP_CMAKEFOLDER_NAME="%CMakeFolder%" -DCMAKE_CL_64=%CMake_Arch64Bit% -DCMAKE_ARCH=%CMake_ARCH% -DXMP_BUILD_WARNING_AS_ERROR=%CMake_Build_Warning_As_Error% -DXMP_BUILD_STATIC="%CMake_BuildStatic%" +echo cmake ../../../. -G"%GeneratorVersion%" -A %GeneratorArchitecture% -DXMP_CMAKEFOLDER_NAME="%CMakeFolder%" -DCMAKE_CL_64=%CMake_Arch64Bit% -DCMAKE_ARCH=%CMake_ARCH% -DXMP_BUILD_WARNING_AS_ERROR=%CMake_Build_Warning_As_Error% -DXMP_BUILD_STATIC="%CMake_BuildStatic%" +cmake ../../../. -G"%GeneratorVersion%" -A %GeneratorArchitecture% -DXMP_CMAKEFOLDER_NAME="%CMakeFolder%" -DCMAKE_CL_64=%CMake_Arch64Bit% -DCMAKE_ARCH=%CMake_ARCH% -DXMP_BUILD_WARNING_AS_ERROR=%CMake_Build_Warning_As_Error% -DXMP_BUILD_STATIC="%CMake_BuildStatic%" if errorlevel 1 goto error goto ok diff --git a/build/shared/CMakeUtils.sh b/build/shared/CMakeUtils.sh index 9bb8d81..150803c 100644 --- a/build/shared/CMakeUtils.sh +++ b/build/shared/CMakeUtils.sh @@ -14,11 +14,13 @@ if [ "$unamestr" == 'Linux' ]; then is_makefile='ON' cmake_generator='Unix Makefiles' compiler='gcc' + cmake_modesubdir='_64' PATH=$XMPROOT/tools/cmake/bin:$PATH elif [ "$unamestr" == 'Darwin' ]; then is_makefile='OFF' cmake_generator='Xcode' compiler='xcode' + cmake_modesubdir='universal' PATH=$XMPROOT/tools/cmake/bin/CMake.app/Contents/bin:$PATH else is_makefile='ON' @@ -42,7 +44,6 @@ cd "$(dirname $0)" >/dev/null cmake_build_warning_as_error="Off" TOOLCHAIN="" cmake_buildbitdepth='On' -cmake_modesubdir='_64' export MACHTYPE=x86_64 cmake_buildmode="Release" cmake_buildtype="dynamic" @@ -64,7 +65,6 @@ elif [ "$1" == "Debug" ]; then cmake_buildmode="Debug" elif [ "$1" == "libcpp" ]; then cmake_libcpp="On" - cmake_modesubdir="$cmake_modesubdir"_libcpp elif [ "$1" == "WarningAsError" ]; then cmake_build_warning_as_error="On" elif [ "$1" == "Clean" ]; then @@ -99,7 +99,7 @@ else if [ "$TOOLCHAIN" == "Toolchain_ios.cmake" ]; then cmakedir="$compiler/$cmake_buildtype/ios" else - cmakedir="$compiler/$cmake_buildtype/intel$cmake_modesubdir" + cmakedir="$compiler/$cmake_buildtype/$cmake_modesubdir" fi cmakeconfigdir="../../../." fi diff --git a/build/shared/SharedConfig_Common.cmake b/build/shared/SharedConfig_Common.cmake index 6a34588..f9cf813 100644 --- a/build/shared/SharedConfig_Common.cmake +++ b/build/shared/SharedConfig_Common.cmake @@ -25,18 +25,7 @@ function(SetupTargetArchitecture) else() if(CMAKE_CL_64) set(${COMPONENT}_BITDEPTH "64" PARENT_SCOPE) - if(CMAKE_LIBCPP) - set(${COMPONENT}_CPU_FOLDERNAME "intel_64_libcpp" PARENT_SCOPE) - else() - set(${COMPONENT}_CPU_FOLDERNAME "intel_64" PARENT_SCOPE) - endif() - else() - set(${COMPONENT}_BITDEPTH "32" PARENT_SCOPE) - if(CMAKE_LIBCPP) - set(${COMPONENT}_CPU_FOLDERNAME "intel_libcpp" PARENT_SCOPE) - else() - set(${COMPONENT}_CPU_FOLDERNAME "intel" PARENT_SCOPE) - endif() + set(${COMPONENT}_CPU_FOLDERNAME "universal" PARENT_SCOPE) endif() endif() endfunction(SetupTargetArchitecture) diff --git a/build/shared/ToolchainLLVM.cmake b/build/shared/ToolchainLLVM.cmake index c3d5051..ab3c736 100644 --- a/build/shared/ToolchainLLVM.cmake +++ b/build/shared/ToolchainLLVM.cmake @@ -12,7 +12,10 @@ # Force XCode to use specific compiler # options are "4.0", "4.2", "com.apple.compilers.llvmgcc42", "com.intel.compilers.icc.12_1_0", "com.apple.compilers.llvm.clang.1_0" set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") +set(CMAKE_C_COMPILER xcrun -find clang) +set(CMAKE_CXX_COMPILER xcrun -find clang++) + # SDK and deployment -set(XMP_OSX_SDK 10.14) -set(XMP_OSX_TARGET 10.12) +set(XMP_OSX_SDK 11.1) +set(XMP_OSX_TARGET 10.13) |