Browse Source

Fix build error on AppVeyor for VS2008 and cleanup appveyor

The amalgamation header target needs to be a dependency of
open62541-object so that the dependencies are solved correctly.
Stefan Profanter 6 years ago
parent
commit
6e35296a16
2 changed files with 17 additions and 17 deletions
  1. 8 5
      CMakeLists.txt
  2. 9 12
      appveyor.yml

+ 8 - 5
CMakeLists.txt

@@ -485,7 +485,9 @@ if(UA_ENABLE_AMALGAMATION)
     # make sure the open62541_amalgamation target builds before so that amalgamation is finished and it is not executed again for open62541-object
     # and thus may overwrite the amalgamation result during multiprocessor compilation
     # the header is already a dependency of open62541 target itself
-    add_dependencies(open62541-object open62541-amalgamation-source)
+    add_dependencies(open62541-object
+            open62541-amalgamation-header
+            open62541-amalgamation-source)
 
     add_library(open62541 $<TARGET_OBJECTS:open62541-object>)
 
@@ -495,7 +497,11 @@ if(UA_ENABLE_AMALGAMATION)
 else()
     add_definitions(-DUA_NO_AMALGAMATION)
     add_library(open62541-object OBJECT ${lib_sources} ${internal_headers} ${exported_headers})
-    add_dependencies(open62541-object open62541-generator-types open62541-generator-transport open62541-generator-statuscode)
+    add_dependencies(open62541-object
+            open62541-amalgamation-header
+            open62541-generator-types
+            open62541-generator-transport
+            open62541-generator-statuscode)
     target_include_directories(open62541-object PRIVATE ${PROJECT_SOURCE_DIR}/src)
 
     add_library(open62541-plugins OBJECT ${default_plugin_sources} ${exported_headers})
@@ -530,9 +536,6 @@ endif()
 # DLL requires linking to dependencies
 target_link_libraries(open62541 ${open62541_LIBRARIES})
 
-# Always generate the amalgamated header
-add_dependencies(open62541 open62541-amalgamation-header)
-
 # Generate properly versioned shared library links on Linux
 SET_TARGET_PROPERTIES(open62541 PROPERTIES SOVERSION 0 VERSION "${OPEN62541_VER_MAJOR}.${OPEN62541_VER_MINOR}.${OPEN62541_VER_PATCH}")
 

+ 9 - 12
appveyor.yml

@@ -22,22 +22,19 @@ environment:
           OUT_DIR_EXAMPLES: bin\examples
         - CC_NAME: Visual Studio 9 2008
           CC_SHORTNAME: vs2008
-          # Do not build in parallel, project dependencies are not solved correctly and thus appveyor may randomly fail
-          MAKE: msbuild /m:1 /p:BuildInParallel=false open62541.sln
+          MAKE: msbuild /m open62541.sln
           FORCE_CXX: ON
           OUT_DIR_LIB: bin\Debug
           OUT_DIR_EXAMPLES: bin\examples\Debug
         - CC_NAME: Visual Studio 12 2013
           CC_SHORTNAME: vs2013
-          # Do not build in parallel, project dependencies are not solved correctly and thus appveyor may randomly fail
-          MAKE: msbuild /m:1 /p:BuildInParallel=false open62541.sln
+          MAKE: msbuild /m open62541.sln
           FORCE_CXX: OFF
           OUT_DIR_LIB: bin\Debug
           OUT_DIR_EXAMPLES: bin\examples\Debug
         - CC_NAME: Visual Studio 12 2013 Win64
           CC_SHORTNAME: vs2013-x64
-          # Do not build in parallel, project dependencies are not solved correctly and thus appveyor may randomly fail
-          MAKE: msbuild /m:1 /p:BuildInParallel=false open62541.sln
+          MAKE: msbuild /m open62541.sln
           FORCE_CXX: OFF
           OUT_DIR_LIB: bin\Debug
           OUT_DIR_EXAMPLES: bin\examples\Debug
@@ -54,9 +51,9 @@ init:
 install:
   - git submodule update --init --recursive
   - if not exist "%CYG_ROOT%" mkdir "%CYG_ROOT%"
-  - ps: echo "Installing Cygwin from $env:CYG_SETUP_URL to $env:CYG_ROOT/setup-x86.exe"
+  - ps: echo Installing Cygwin from $env:CYG_SETUP_URL to $env:CYG_ROOT/setup-x86.exe
   - appveyor DownloadFile %CYG_SETUP_URL% -FileName %CYG_ROOT%/setup-x86.exe
-  - ps: echo "Downloaded. Now ready to install."
+  - ps: echo Downloaded. Now ready to install.
   - cmd: '"%CYG_ROOT%/setup-x86.exe" --quiet-mode --no-shortcuts --only-site -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" --packages cmake,python'
   - cmd: '%CYG_BASH% -lc "cygcheck -dc cygwin"'
   # Install miktex to get pdflatex, if we don't get it from the cache
@@ -95,7 +92,7 @@ build_script:
   # now start build
   - md build
   - cd build
-  - echo "Building Documentation on %CC_NAME%"
+  - echo. && echo ##### Building Documentation on %CC_NAME% ##### && echo.
   - cmake -DMIKTEX_BINARY_PATH=c:\miktex\texmfs\install\miktex\bin -DCMAKE_BUILD_TYPE=Release -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -DUA_BUILD_EXAMPLES:BOOL=OFF -G"%CC_NAME%" ..
   - cmake --build . --target doc_latex & cmake --build . --target doc_pdf
   - move "%APPVEYOR_BUILD_FOLDER%\build\doc_latex\open62541.pdf" %APPVEYOR_BUILD_FOLDER%\pack\
@@ -103,14 +100,14 @@ build_script:
   - rd /s /q build
   - md build
   - cd build
-  - echo "Testing %CC_NAME%"
+  - echo. && echo ##### Testing %CC_NAME% ##### && echo.
   - cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -G"%CC_NAME%" ..
   - '%MAKE%'
   - cd ..
   - rd /s /q build
   - md build
   - cd build
-  - echo "Testing %CC_NAME% with amalgamation"
+  - echo. && echo ##### Testing %CC_NAME% with amalgamation ##### && echo.
   - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -DBUILD_SHARED_LIBS:BOOL=OFF -G"%CC_NAME%" ..
   - '%MAKE%'
   - md %APPVEYOR_BUILD_FOLDER%\pack_tmp
@@ -126,7 +123,7 @@ build_script:
   - rd /s /q build
   - md build
   - cd build
-  - echo "Testing %CC_NAME% with amalgamation and .dll"
+  - echo. && echo ##### Testing %CC_NAME% with amalgamation and .dll ##### && echo.
   - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -DBUILD_SHARED_LIBS:BOOL=ON -G"%CC_NAME%" ..
   - '%MAKE%'
   - md %APPVEYOR_BUILD_FOLDER%\pack_tmp