Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/buildThirdPartyLibrary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ jobs:
uses: opencor/buildcache-action@v1
with:
cache_key: webassembly
- name: Install LLVM
run: |
brew install llvm
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
- name: Install Emscripten
run: brew install emscripten
- name: Configure libOpenCOR (for a specific third-party library)
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
install_prefix: cmake
- name: 'Windows shared library (Intel)'
os: windows-2022
arch: amd64
Expand All @@ -41,6 +42,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
install_prefix: cmake
copy_dll: ON
- name: 'Windows static library (ARM)'
os: windows-11-arm
Expand All @@ -56,6 +58,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
install_prefix: cmake
- name: 'Windows shared library (ARM)'
os: windows-11-arm
arch: amd64_arm64
Expand All @@ -70,6 +73,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
install_prefix: cmake
copy_dll: ON
- name: 'Linux static library (Intel)'
os: ubuntu-24.04
Expand All @@ -84,7 +88,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'Linux shared library (Intel)'
os: ubuntu-24.04
build_type: Release
Expand All @@ -98,7 +102,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'Linux static library (ARM)'
os: ubuntu-24.04-arm
build_type: Release
Expand All @@ -112,7 +116,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'Linux shared library (ARM)'
os: ubuntu-24.04-arm
build_type: Release
Expand All @@ -126,7 +130,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'macOS static library (Intel)'
os: macos-15-intel
build_type: Release
Expand All @@ -140,7 +144,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'macOS shared library (Intel)'
os: macos-15-intel
build_type: Release
Expand All @@ -154,7 +158,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'macOS static library (ARM)'
os: macos-15
build_type: Release
Expand All @@ -168,7 +172,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'macOS shared library (ARM)'
os: macos-15
build_type: Release
Expand All @@ -182,7 +186,7 @@ jobs:
unit_testing: ON
target: unit_testing
install_uninstall_and_package: ON
use_install_prefix: ON
install_prefix: lib/cmake
- name: 'JavaScript bindings'
os: ubuntu-24.04
build_type: Release
Expand Down Expand Up @@ -297,7 +301,7 @@ jobs:
python_support: OFF
shared_libs: ON
unit_testing: ON
context: PATH=/opt/homebrew/opt/llvm@20/bin:$PATH CC=/opt/homebrew/opt/llvm@20/bin/clang CXX=/opt/homebrew/opt/llvm@20/bin/clang++
context: PATH=/opt/homebrew/opt/llvm/bin:$PATH CC=/opt/homebrew/opt/llvm/bin/clang CXX=/opt/homebrew/opt/llvm/bin/clang++
target: code_coverage
- name: 'Memory checks'
os: macos-15
Expand Down Expand Up @@ -355,7 +359,7 @@ jobs:
arch: ${{ matrix.arch }}
- name: Install LLVM
if: ${{ matrix.code_coverage == 'ON' }}
run: brew install --overwrite llvm@20
run: brew install llvm
- name: Install Clang
if: ${{ matrix.code_analysis == 'ON' }}
run: |
Expand Down Expand Up @@ -403,7 +407,7 @@ jobs:
- name: Configure libOpenCOR
shell: bash
run: |
if [ '${{ matrix.use_install_prefix }}' == 'ON' ]; then export D_INSTALL_PREFIX='-DINSTALL_PREFIX=${{ github.workspace }}/install'; fi
if [ '${{ matrix.install_prefix }}' != '' ]; then export D_INSTALL_PREFIX='-DINSTALL_PREFIX=${{ github.workspace }}/install'; fi
${{ matrix.context }} cmake -G Ninja -S . -B build -DBUILD_TYPE=${{ matrix.build_type }} -DCODE_ANALYSIS=${{ matrix.code_analysis }} -DCODE_COVERAGE=${{ matrix.code_coverage }} -DDOCUMENTATION=${{ matrix.documentation }} $D_INSTALL_PREFIX -DJAVASCRIPT_BINDINGS=${{ matrix.javascript_support }} -DJAVASCRIPT_UNIT_TESTING=${{ matrix.javascript_support }} -DMEMORY_CHECKS=${{ matrix.memory_checks }} -DPYTHON_BINDINGS=${{ matrix.python_support }} -DPYTHON_UNIT_TESTING=${{ matrix.python_support }} -DSHARED_LIBS=${{ matrix.shared_libs }} -DUNIT_TESTING=${{ matrix.unit_testing }}
- name: Build libOpenCOR
if: ${{ (matrix.install_uninstall_and_package == 'ON') || (matrix.javascript_support == 'ON') || (matrix.python_support == 'ON') }}
Expand Down Expand Up @@ -454,10 +458,10 @@ jobs:
shell: bash
run: |
cd tests/install
if [ '${{ matrix.use_install_prefix }}' == 'ON' ]; then export D_CMAKE_PREFIX_PATH='-DCMAKE_PREFIX_PATH=${{ github.workspace }}/install'; fi
if [ '${{ matrix.install_prefix }}' != '' ]; then export D_CMAKE_PREFIX_PATH='-DCMAKE_PREFIX_PATH=${{ github.workspace }}/install/${{ matrix.install_prefix }}'; fi
cmake -G Ninja -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} $D_CMAKE_PREFIX_PATH
cmake --build build
if [ '${{ matrix.copy_dll }}' == 'ON' ]; then cp "C:/Program Files (x86)/libOpenCOR/bin/libOpenCOR.dll" build; fi
if [ '${{ matrix.copy_dll }}' == 'ON' ]; then cp "${{ github.workspace }}/install/bin/libOpenCOR.dll" build; fi
build/testInstall
- name: Uninstall libOpenCOR
if: ${{ matrix.install_uninstall_and_package == 'ON' }}
Expand Down
10 changes: 1 addition & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.15)

# Some CMake policies.

foreach(POLICY CMP0096 CMP0144)
if(POLICY ${POLICY})
cmake_policy(SET ${POLICY} NEW)
endif()
endforeach()
cmake_minimum_required(VERSION 3.27)

# Project details.

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20260616.0
0.20260618.0
2 changes: 1 addition & 1 deletion cmake/clcachewrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main(int pArgC, char *pArgV[])
{
// Call clcache with the given arguments, except the first one, which is the full path to the MSVC compiler.

#define STRING_SIZE 32768
#define STRING_SIZE 32768

char clcacheCommand[STRING_SIZE] = "clcache";
int k = 6;
Expand Down
21 changes: 21 additions & 0 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,21 @@ function(configure_target TARGET)
# Ignore some MSVC warnings.

if(BUILDING_USING_MSVC)
# Suppress the warning about needing to export classes from a DLL when using the /MD or /MDd options, which is
# the case for all our targets, as we want to be able to link them with both static and dynamic libraries. This
# warning is triggered by the use of std::string in our public API, but it doesn't cause any issues as long as
# we are consistent with the runtime library we are using (which we are, as we use the same runtime library for
# all our targets).

target_compile_options(${TARGET} PRIVATE
/wd4251)

# Suppress warnings from SYSTEM (external) headers, which includes all third-party library headers (LLVM+Clang,
# libcurl, libxml2, etc.). This avoids having to manually wrap every third-party include with
# #pragma warning(disable/default: ...) in each source file.

target_compile_options(${TARGET} PRIVATE
/wd4702)
endif()

# Treat warnings as errors.
Expand All @@ -69,6 +82,14 @@ function(configure_target TARGET)
endif()
endif()

# Add the /Zc:preprocessor option to avoid multiple OPT_ enums defaulting to the exact same name when using
# LLVM+Clang.

if(BUILDING_USING_MSVC)
target_compile_options(${TARGET} PRIVATE
/Zc:preprocessor)
endif()

# Analyse the code.

if(LIBOPENCOR_CODE_ANALYSIS)
Expand Down
1 change: 0 additions & 1 deletion cmake/environmentchecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ if(NOT BUILDCACHE_EXE)
endif()
endif()

find_program(7Z_EXE NAMES ${PREFERRED_7Z_NAMES} 7z)
find_program(BIOME_EXE NAMES ${PREFERRED_BIOME_NAMES} biome)
find_program(RUFF_EXE NAMES ${PREFERRED_RUFF_NAMES} ruff)
find_program(CLANG_FORMAT_EXE NAMES ${PREFERRED_CLANG_FORMAT_NAMES} clang-format)
Expand Down
3 changes: 3 additions & 0 deletions cmake/formatting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

if(FORMAT_CODE_AVAILABLE)
set(GIT_FILES
${CMAKE_SOURCE_DIR}/cmake/base64encoder.cpp
${CMAKE_SOURCE_DIR}/cmake/clcachewrapper.c
${CMAKE_SOURCE_DIR}/cmake/staticarchiveextractor.cpp
${GIT_API_HEADER_FILES}
${GIT_API_MODULE_FILE}
${GIT_SOURCE_FILES}
Expand Down
2 changes: 1 addition & 1 deletion cmake/packaging/patch.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ file(READ ${CMAKE_FILE} FILE_CONTENTS)
# entry to those needed system libraries or remove the INTERFACE_LINK_LIBRARIES entry altogether.

if(WIN32)
string(REGEX REPLACE "INTERFACE_LINK_LIBRARIES[^\n]*\n" "INTERFACE_LINK_LIBRARIES \"$<LINK_ONLY:bcrypt.lib>;$<LINK_ONLY:crypt32.lib>;$<LINK_ONLY:iphlpapi.lib>;$<LINK_ONLY:version.lib>;$<LINK_ONLY:wldap32.lib>;$<LINK_ONLY:ws2_32.lib>\"\n" FILE_CONTENTS "${FILE_CONTENTS}")
string(REGEX REPLACE "INTERFACE_LINK_LIBRARIES[^\n]*\n" "INTERFACE_LINK_LIBRARIES \"$<LINK_ONLY:bcrypt.lib>;$<LINK_ONLY:crypt32.lib>;$<LINK_ONLY:iphlpapi.lib>;$<LINK_ONLY:ntdll.lib>;$<LINK_ONLY:version.lib>;$<LINK_ONLY:wldap32.lib>;$<LINK_ONLY:ws2_32.lib>\"\n" FILE_CONTENTS "${FILE_CONTENTS}")
elseif(APPLE)
string(REGEX REPLACE "INTERFACE_LINK_LIBRARIES[^\n]*\n" "INTERFACE_LINK_LIBRARIES \"-framework CoreFoundation;-framework SystemConfiguration;$<LINK_ONLY:ldap>\"\n" FILE_CONTENTS "${FILE_CONTENTS}")
else()
Expand Down
Loading
Loading