Skip to content

Commit

Permalink
fix workflow windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Oct 1, 2024
1 parent 47af375 commit 404ea6e
Show file tree
Hide file tree
Showing 36 changed files with 2,226 additions and 22 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/CI_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * This file is part of ISIMPA. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * ISIMPA is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * ISIMPA is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * License along with ISIMPA. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************

# This is the master workflow for CI of I-SIMPA.
# It (only) aims at properly organizing the sub-workflows.

name: I-SIMPA master CI
name: I-SIMPA main CI

on: [workflow_dispatch, push, pull_request]

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/actions/windows/getCcache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * This file is part of ISIMPA. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * ISIMPA is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * ISIMPA is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * License along with ISIMPA. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/actions/windows/getLibpack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * This file is part of ISIMPA. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * ISIMPA is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * ISIMPA is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * License along with ISIMPA. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sub_prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * This file is part of ISIMPA. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * ISIMPA is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * ISIMPA is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * License along with ISIMPA. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************

# This is the pre-check workflow for CI of FreeCAD.
# This is the pre-check workflow for CI of ISIMPA.
# It aims at running some basic checks about the workflow run ...
# ... and gathering some data needed for the next steps.

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sub_wrapup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
# * *
# * Copyright (c) 2023 0penBrain. *
# * *
# * This file is part of FreeCAD. *
# * This file is part of ISIMPA. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * ISIMPA is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD is distributed in the hope that it will be useful, but *
# * ISIMPA is distributed in the hope that it will be useful, but *
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * License along with ISIMPA. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ project (isimpa VERSION 1.3.4)
# a better way to load dependencies
include(cmake/CPM.cmake)

# include helper functions/macros
add_subdirectory(cMake/ISIMPA_Helpers)

ISIMPALibpackChecks()

# convert path of a .lib file into a .dll file
# findboost does not store .dll locations
macro(LIB_TO_DLL LIBPATH DLL_PATH)
Expand Down
60 changes: 60 additions & 0 deletions cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckSymbolExists)
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckTypeSize)
include(CheckCSourceCompiles)
include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)

check_include_file(GL/gl.h HAVE_GL_GL_H)

# i/o streams
check_include_file_cxx(istream HAVE_ISTREAM)
check_include_file_cxx(ostream HAVE_OSTREAM)
check_include_file_cxx(fstream HAVE_FSTREAM)
check_include_file_cxx(sstream HAVE_SSTREAM)
check_include_file_cxx(ios HAVE_IOS)
check_include_file_cxx(iostream HAVE_IOSTREAM)
check_include_file_cxx(iomanip HAVE_IOMANIP)

include(TestForANSIStreamHeaders)
IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
SET(HAVE_STD_IOSTREAM 1)
SET(USE_STD_IOSTREAM 1)
ENDIF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)

include(TestForSTDNamespace)
IF(NOT CMAKE_NO_ANSI_STRING_STREAM)
SET(HAVE_NAMESPACES 1)
ENDIF(NOT CMAKE_NO_ANSI_STRING_STREAM)

SET(HAVE_QGLFORMAT_EQ_OP 1)
SET(HAVE_QGLFORMAT_SETOVERLAY 1)
SET(HAVE_QGLWIDGET_SETAUTOBUFFERSWAP 1)
SET(HAVE_QT_KEYPAD_DEFINE 1)
SET(HAVE_QWIDGET_SHOWFULLSCREEN 1)


file(WRITE ${CMAKE_BINARY_DIR}/backtrace.cpp
"#include <cstddef>\n"
"#include <execinfo.h>\n\n"
"int main() {\n"
" void *callstack[128];\n"
" size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);\n"
" size_t nFrames = backtrace(callstack, nMaxFrames);\n"
" char **symbols = backtrace_symbols(callstack, nFrames);\n"
" return 0;\n"
"}"
)

try_compile(
RESULT_VAR
${CMAKE_BINARY_DIR}
SOURCES
${CMAKE_BINARY_DIR}/backtrace.cpp
)

SET(HAVE_BACKTRACE_SYMBOLS ${RESULT_VAR})
70 changes: 70 additions & 0 deletions cmake/FindCoin3DDoc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Try to find Coin3D Doc
# If found, this will define
#
# COIN3D_DOC_FOUND - we have access to Coin3D doc, either locally
# or on the net
# COIN3D_DOC_TAGFILE - full name of the tag file
# COIN3D_DOC_PATH - path to html Coin3D doc

SET( COIN3D_DOC_FOUND "NO" )

IF (COIN3D_FOUND)
IF (WIN32)
IF (CYGWIN)
# Not yet implemented
ELSE (CYGWIN)
# Not yet implemented
ENDIF (CYGWIN)
ELSE (WIN32)
IF(APPLE)
# Not yet implemented
ELSE(APPLE)
# Unix systems
find_path(COIN3D_DOC_PATH index.html
/usr/share/doc/libcoin80-doc/html
/usr/share/doc/coin/html
/usr/share/doc/Coin/html
)
IF( EXISTS ${COIN3D_DOC_PATH})
message(STATUS "Coin3D doc is installed")
find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag
PATHS ${COIN3D_DOC_PATH}
)
IF( EXISTS ${COIN3D_DOC_TAGFILE})
SET( COIN3D_DOC_FOUND "YES"
)
ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz
PATHS ${COIN3D_DOC_PATH}
)
IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}")
message(STATUS " You should uncompress this file if you want to use it for source doc generation")
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})

ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})

ELSE( EXISTS ${COIN3D_DOC_PATH})
#fallback: tries to use online coin doc
message(STATUS "Coin3D doc is not installed")
SET(COIN3D_DOC_PATH
http://doc.coin3d.org/Coin
)
find_file(COIN3D_DOC_TAGFILE coin.tag
${CMAKE_BINARY_DIR}/src/Doc
)
IF( EXISTS ${COIN3D_DOC_TAGFILE})
SET( COIN3D_DOC_FOUND "YES" )
ENDIF( EXISTS ${COIN3D_DOC_TAGFILE})
ENDIF( EXISTS ${COIN3D_DOC_PATH})
ENDIF(APPLE)
ENDIF(WIN32)
ENDIF(COIN3D_FOUND)

if(COIN3D_DOC_FOUND)
message(STATUS " Tag file: ${COIN3D_DOC_TAGFILE}")
message(STATUS " Location: ${COIN3D_DOC_PATH}")
endif(COIN3D_DOC_FOUND)

# export for others
SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
65 changes: 65 additions & 0 deletions cmake/FindEigen3.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# - Try to find Eigen3 lib
#
# This module supports requiring a minimum version, e.g. you can do
# find_package(Eigen3 3.1.2)
# to require version 3.1.2 or newer of Eigen3.
#
# Once done this will define
#
# EIGEN3_FOUND - system has eigen lib with correct version
# EIGEN3_INCLUDE_DIR - the eigen include directory
# EIGEN3_VERSION - eigen version

# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.

if(NOT Eigen3_FIND_VERSION)
set(Eigen3_FIND_VERSION_MAJOR 3)
set(Eigen3_FIND_VERSION_MINOR 0)
set(Eigen3_FIND_VERSION_PATCH 0)
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
endif(NOT Eigen3_FIND_VERSION)

macro(_eigen3_check_version)
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)

string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")

set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK FALSE)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
"but at least version ${Eigen3_FIND_VERSION} is required")
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK TRUE)
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
endmacro(_eigen3_check_version)

if (EIGEN3_INCLUDE_DIR)
# in cache already
_eigen3_check_version()
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
else (EIGEN3_INCLUDE_DIR)

find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
PATHS
${CMAKE_INSTALL_PREFIX}/include
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen3 eigen
)

if(EIGEN3_INCLUDE_DIR)
_eigen3_check_version()
endif(EIGEN3_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION)
mark_as_advanced(EIGEN3_INCLUDE_DIR)

endif(EIGEN3_INCLUDE_DIR)
Loading

0 comments on commit 404ea6e

Please sign in to comment.