MSVC2013 c++11 support

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: MSVC2013 c++11 support

Post by saso »

apeltauer wrote: Sun Apr 07, 2019 3:11 pm Looking through your appveyor.yml I dont find the line where you set the environment variable for the LibPack?!?
This is just the final cleaned up version of the configuration that worked, if you go over the commits history at the github or the builds on appveyor you will see that I have tried many different things
https://github.com/sasobadovinac/FreeCA ... yor_vs2015
https://ci.appveyor.com/project/sasobad ... ad/history

here are some test builds with FREECAD_LIBPACK_DIR as environment variable (on top of every build there is a link to the commit)
https://ci.appveyor.com/project/sasobad ... s/23648724
https://ci.appveyor.com/project/sasobad ... s/23648849
apeltauer wrote: Sun Apr 07, 2019 3:11 pm Also, i think you should add some time stamps. How long does the download of the libpack take? How long does it take to unzip the pack?
If you hoover the mouse over the log at appveyor you can see the time for every line
apeltauer wrote: Sun Apr 07, 2019 3:11 pm All plans have 60 minutes quota per build job. https://www.appveyor.com/docs/build-con ... d-pipeline)
Also how many cpu cores are available?
Yes, I think there are 2 cpus and we are using the msbuild /m switch to use all the available cores
https://www.appveyor.com/docs/build-environment/
https://www.appveyor.com/pricing/

In the past I have been testing https://github.com/frerich/clcache to speed up the Win builds, it worked, but not quite as it should. However I have not tested it lately, so maybe things have improved. But IMO, the first next thing to try is to set it up on Travis (I am quite busy with other things lately but maybe I will find some time to try it).

An article on speeding up C and C++ builds https://www.viva64.com/en/b/0549/
Last edited by saso on Sun Apr 07, 2019 6:38 pm, edited 2 times in total.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: MSVC2013 c++11 support

Post by sgrogan »

wmayer wrote: Sun Apr 07, 2019 5:50 pm today I tested cmake 3.14 and when trying to create VS project files it stopped with an error that it couldn't find the C++ compiler.
You need to also pass the "generator", for VS2015 (@saso is using this) I use;

Code: Select all

cmake -G "Visual Studio 14 2015 Win64" ^
      -DBUILD_QT5=TRUE ^
I've been testing with the CMake-gui. Sometimes it finds my Conda python, I think it requires running config twice to cause this behavior.

EDIT:
In the past I have been testing https://github.com/frerich/clcache to speed up the Win builds, it worked, but not quite as it should. However I have not tested it lately, so maybe things have improved. But IMO, the first next thing to try is to set it up on Travis.
Agreed, we could disable most FreeCAD wb's on AppVeyor, to overcome the time outs. This would only be temporary to get over the libpack issues?
"fight the good fight"
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: MSVC2013 c++11 support

Post by wmayer »

sgrogan wrote: Sun Apr 07, 2019 6:26 pm
wmayer wrote: Sun Apr 07, 2019 5:50 pm today I tested cmake 3.14 and when trying to create VS project files it stopped with an error that it couldn't find the C++ compiler.
You need to also pass the "generator", for VS2015 (@saso is using this) I use;

Code: Select all

cmake -G "Visual Studio 14 2015 Win64" ^
      -DBUILD_QT5=TRUE ^
But not when using cmake-gui because then a dialog pops up where I can select the generator. With cmake 3.11 it works perfectly well but it fails with 3.14 (I haven't tested 3.12 and 3.13).
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: MSVC2013 c++11 support

Post by abdullah »

I found some comment about a bug in MSVC2015 making it slow:
https://developercommunity.visualstudio ... 7c447.html

I tried with MSVC2017:

https://ci.appveyor.com/project/yorikva ... s/23927302

https://github.com/FreeCAD/FreeCAD/pull/1974

But it still times out, even removing some workbenches:

Code: Select all

#version:

image: Visual Studio 2017

environment:
  matrix:
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      generator: "Visual Studio 15 2017 Win64"
      ARCH: "Win64"
      Compiler: "MSVC2017"

#cache: #

configuration:
  #- Debug
  - Release

#branches:
#  only:

clone_depth: 1600

# scripts that are called at very beginning, before repo cloning
#init:

#before_build:

# scripts that run after cloning repository
#todo cleanup libpacks on the FreeCAD-ports-cache repo
install:
  - cd C:\projects\freecad
  - if [%ARCH%] == [Win64] (appveyor DownloadFile https://github.com/apeltauer/FreeCAD/releases/download/LibPack_12.1/FreeCADLibs_12.1.2_x64_VC15.7z)
  - if [%ARCH%] == [Win64] (
      powershell -Command 7z x FreeCADLibs_12.1.2_x64_VC15.7z -oFreeCADLibs > nul &&
      call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat")
#  - if [%ARCH%] == [Win32] (appveyor DownloadFile https://github.com/FreeCAD/FreeCAD-ports-cache/releases/download/v0.17/FreeCADLibs_11.5.1_x86_VC12.7z)
#  - if [%ARCH%] == [Win32] (
#      powershell -Command 7z x FreeCADLibs_11.5.1_x86_VC12.7z > nul &&
#      ren FreeCADLibs_11.5_x86_VC12 FreeCADLibs)
  - dir

build_script:
  - cd C:\projects\freecad
  - mkdir build
  - cd build
  - cmake -DFREECAD_LIBPACK_DIR=C:\projects\freecad\FreeCADLibs
    -DBoost_FILESYSTEM_LIBRARY_RELEASE=C:\projects\freecad\FreeCADLibs\lib\boost_filesystem-vc141-mt-x64-1_67.lib
    -DBoost_PROGRAM_OPTIONS_LIBRARY_RELEASE=C:\projects\freecad\FreeCADLibs\lib\boost_program_options-vc141-mt-x64-1_67.lib
    -DBoost_REGEX_LIBRARY_RELEASE=C:\projects\freecad\FreeCADLibs\lib\boost_regex-vc141-mt-x64-1_67.lib
    -DBoost_SYSTEM_LIBRARY_RELEASE=C:\projects\freecad\FreeCADLibs\lib\boost_system-vc141-mt-x64-1_67.lib
    -DBoost_THREAD_LIBRARY_RELEASE=C:\projects\freecad\FreeCADLibs\lib\boost_thread-vc141-mt-x64-1_67.lib
    -DBoost_PYTHON36_LIBRARY_RELEASE=C:\projects\freecad\FreeCADLibs\lib\boost_python36-vc141-mt-x64-1_67.lib
    -DBUILD_FEM_NETGEN=OFF
    -DBUILD_PATH=OFF
    -DBUILD_QT5=ON
    -DBUILD_FEM=OFF
    -DBUILD_ADDONMGR=OFF
    -DBUILD_COMPLETE=OFF
    -DBUILD_ARCH=OFF
    -DBUILD_DRAFT=OFF
    -DBUILD_DRAWING=OFF
    -DBUILD_IMPORT=OFF
    -DBUILD_INSPECTION=OFF
    -DBUILD_MATERIAL=OFF
    -DBUILD_MESH=OFF
    -DBUILD_MESH_PART=OFF
    -DBUILD_OPENSCAD=OFF
    -DBUILD_PATH=OFF
    -DBUILD_PLOT=OFF
    -DBUILD_POINTS=OFF
    -DBUILD_RAYTRACING=OFF
    -DBUILD_REVERSEENGINEERING=OFF
    -DBUILD_ROBOT=OFF
    -DBUILD_SHIP=OFF
    -DBUILD_SHOW=OFF
    -DBUILD_SPREADSHEET=OFF
    -DBUILD_TECHDRAW=OFF
    -DBUILD_SURFACE=OFF
    -G "%generator%" ..
  - mkdir bin
  - xcopy C:\projects\freecad\FreeCADLibs\bin C:\projects\freecad\build\bin /E /Q
  - msbuild /m FreeCAD_Trunk.sln

#after_build:
  - cd C:\projects\freecad\build\bin\
  - FreeCADCmd.exe --run-test 0

#artifacts:

test: off  # to avoid discovering tests

#
# The following section automatically uploads artifacts
# whenever a tag is created on the master branch.
#
#deploy:
Post Reply