Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into bump_370
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed May 30, 2023
2 parents f7a35fa + 78e0442 commit 0e13054
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/buildCSharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,33 +53,35 @@ jobs:
shell: bash
run: |
set -x
sudo apt update && sudo apt install -y ninja-build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE:STRING=Release \
cmake -G Ninja -DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_CSHARP_BINDINGS:BOOL=ON -DBUILD_NUGET_PACKAGE:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF -DBUILD_RUBY_BINDINGS:BOOL=OFF -DBUILD_PYTHON_BINDINGS:BOOL=OFF -DBUILD_CLI:BOOL=OFF \
-DBUILD_PACKAGE:BOOL=OFF \
../
make -j2
ninja
- name: Compile macOS
if: runner.os == 'macOS'
shell: bash
run: |
set -x
brew install ninja
export CC=clang
export CMAKE_OSX_ARCHITECTURES=x86_64
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE:STRING=Release \
cmake -G Ninja -DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_CSHARP_BINDINGS:BOOL=ON -DBUILD_NUGET_PACKAGE:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF -DBUILD_RUBY_BINDINGS:BOOL=OFF -DBUILD_PYTHON_BINDINGS:BOOL=OFF -DBUILD_CLI:BOOL=OFF \
-DBUILD_PACKAGE:BOOL=OFF \
../
make -j3
ninja
- name: Compile Windows 64
if: matrix.name == 'Windows64'
Expand Down
24 changes: 14 additions & 10 deletions csharp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ endif()
set(OPENSTUDIO_CSHARP_DLL "${CSHARP_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/netstandard2.0/OpenStudio.dll")

# ignore deprecated warnings since we will export deprecated methods
if(MSVC)
add_definitions(/wd4996 /bigobj)
else()
add_definitions(-Wno-deprecated-declarations)
endif()

add_library(csharp_warnings INTERFACE)
target_compile_options(csharp_warnings INTERFACE "$<${is_msvc_genex}:/wd4996>")
target_compile_options(csharp_warnings INTERFACE "$<${is_msvc_genex}:/bigobj>")
target_compile_options(csharp_warnings INTERFACE "$<${is_gnu_or_clang_genex}:-Wno-deprecated-declarations>")
target_compile_options(csharp_warnings INTERFACE "$<${is_gnu_or_clang_genex}:-Wno-unused-function>")

# custom command to make OPENSTUDIO_CSHARP_DLL
add_custom_command(
Expand All @@ -66,7 +65,6 @@ add_custom_command(
)



install(FILES "${OPENSTUDIO_CSHARP_DLL}" DESTINATION CSharp/openstudio/ CONFIGURATIONS DEBUG COMPONENT "CSharpAPI")


Expand Down Expand Up @@ -161,7 +159,9 @@ add_dependencies(openstudio_csharp ${ALL_CSHARP_WRAPPER_TARGETS})


target_link_libraries(openstudio_csharp
openstudiolib
PRIVATE
openstudiolib
csharp_warnings
)
install(TARGETS openstudio_csharp DESTINATION CSharp/openstudio/ CONFIGURATIONS DEBUG COMPONENT "CSharpAPI")
install(TARGETS openstudio_csharp DESTINATION CSharp/openstudio/ CONFIGURATIONS RELEASE COMPONENT "CSharpAPI")
Expand All @@ -173,7 +173,9 @@ add_library(
)
add_dependencies(openstudio_model_csharp ${ALL_CSHARP_WRAPPER_TARGETS})
target_link_libraries(openstudio_model_csharp
openstudiolib
PRIVATE
openstudiolib
csharp_warnings
)
install(TARGETS openstudio_model_csharp DESTINATION CSharp/openstudio/ CONFIGURATIONS DEBUG COMPONENT "CSharpAPI")
install(TARGETS openstudio_model_csharp DESTINATION CSharp/openstudio/ CONFIGURATIONS RELEASE COMPONENT "CSharpAPI")
Expand All @@ -185,7 +187,9 @@ add_library(
)
add_dependencies(openstudio_translators_csharp ${ALL_CSHARP_WRAPPER_TARGETS})
target_link_libraries(openstudio_translators_csharp
openstudiolib
PRIVATE
openstudiolib
csharp_warnings
)
install(TARGETS openstudio_translators_csharp DESTINATION CSharp/openstudio/ CONFIGURATIONS DEBUG COMPONENT "CSharpAPI")
install(TARGETS openstudio_translators_csharp DESTINATION CSharp/openstudio/ CONFIGURATIONS RELEASE COMPONENT "CSharpAPI")
Expand Down

0 comments on commit 0e13054

Please sign in to comment.