Skip to content

Commit 9d5c087

Browse files
committed
feat(Static): build static packages
1 parent 160efb8 commit 9d5c087

File tree

11 files changed

+21
-140
lines changed

11 files changed

+21
-140
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ jobs:
3333
build-windows:
3434
needs: format
3535
uses: Geode-solutions/actions/.github/workflows/ci-windows.yml@master
36+
with:
37+
directory: opengeode
38+
secrets: inherit
39+
40+
build-windows-python:
41+
needs: format
42+
uses: Geode-solutions/actions/.github/workflows/ci-windows-python.yml@master
3643
with:
3744
name: OPENGEODE
3845
directory: opengeode
3946
secrets: inherit
4047

4148
semantic-release:
42-
needs: [build-linux, build-linux-python, build-windows]
49+
needs: [build-linux, build-linux-python, build-windows, build-windows-python]
4350
uses: Geode-solutions/actions/.github/workflows/release.yml@master
4451
secrets: inherit

cmake/ConfigureAbseil.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ ExternalProject_Add(abseil
3434
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
3535
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
3636
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
37-
-DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}
38-
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
3937
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
4038
CMAKE_CACHE_ARGS
4139
-DCMAKE_INSTALL_PREFIX:PATH=${ABSEIL_INSTALL_PREFIX}

cmake/ConfigureAsync++.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ ExternalProject_Add(asyncplusplus
3333
-DCMAKE_INSTALL_MESSAGE=LAZY
3434
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
3535
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
36-
-DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}
37-
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
3836
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
3937
CMAKE_CACHE_ARGS
4038
-DCMAKE_INSTALL_PREFIX:PATH=${ASYNCPLUSPLUS_INSTALL_PREFIX}

cmake/ConfigurePybind11.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020

2121
set(PYBIND11_PATH ${PROJECT_BINARY_DIR}/third_party/pybind11)
2222
set(PYBIND11_INSTALL_PREFIX ${PYBIND11_PATH}/install)
23-
if(WIN32)
24-
if(CMAKE_CXX_FLAGS_DEBUG)
25-
string(REPLACE "/MDd" "/MD" NEW_FLAGS ${CMAKE_CXX_FLAGS_DEBUG})
26-
endif()
27-
endif()
2823
ExternalProject_Add(pybind11
2924
PREFIX ${PYBIND11_PATH}
3025
GIT_REPOSITORY https://github.com/pybind/pybind11
@@ -38,8 +33,6 @@ ExternalProject_Add(pybind11
3833
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
3934
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
4035
CMAKE_CACHE_ARGS
41-
-DCMAKE_C_FLAGS_DEBUG:INTERNAL=${NEW_FLAGS}
42-
-DCMAKE_CXX_FLAGS_DEBUG:INTERNAL=${NEW_FLAGS}
4336
-DPYBIND11_PYTHON_VERSION:STRING=${PYTHON_VERSION}
4437
-DPYBIND11_INSTALL:BOOL=ON
4538
-DPYBIND11_TEST:BOOL=OFF

cmake/SuperBuild.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ if(NOT CPACK_PACKAGE_VERSION)
2222
set(CPACK_PACKAGE_VERSION "master")
2323
endif()
2424

25-
if(WIN32)
26-
if(CMAKE_C_FLAGS_DEBUG)
27-
string(REPLACE "/MDd" "/MD" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
28-
endif()
29-
if(CMAKE_CXX_FLAGS_DEBUG)
30-
string(REPLACE "/MDd" "/MD" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
31-
endif()
32-
endif()
33-
3425
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
3526
message(STATUS "Setting build type to 'Release' as none was specified.")
3627
set(CMAKE_BUILD_TYPE "Release" CACHE STRING

cmake/utils.cmake

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,10 @@ add_compile_options(
5050
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wshadow>
5151
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wnon-virtual-dtor>
5252
)
53-
54-
if(WIN32)
55-
if(CMAKE_C_FLAGS_DEBUG)
56-
string(REPLACE "/MDd" "/MD" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
57-
endif()
58-
if(CMAKE_CXX_FLAGS_DEBUG)
59-
string(REPLACE "/MDd" "/MD" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
60-
endif()
53+
if(NOT BUILD_SHARED_LIBS)
54+
add_link_options(
55+
$<$<CXX_COMPILER_ID:MSVC>:/INCREMENTAL:NO>
56+
)
6157
endif()
6258

6359
#------------------------------------------------------------------------------------------------
@@ -274,6 +270,13 @@ function(_add_geode_executable exe_path folder_name)
274270
PROPERTIES
275271
VS_DEBUGGER_ENVIRONMENT "PATH=${directories}\\;$ENV{Path}"
276272
)
273+
if(NOT BUILD_SHARED_LIBS)
274+
set(pdb_file "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIG>/${target_name}.pdb")
275+
add_custom_command(
276+
TARGET ${target_name} POST_BUILD
277+
COMMAND ${CMAKE_COMMAND} -E remove ${pdb_file}
278+
)
279+
endif()
277280
endif()
278281

279282
set_target_properties(${target_name}

src/geode/basic/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,3 @@ add_geode_library(
9292
spdlog::spdlog_header_only
9393
MINIZIP::minizip-ng
9494
)
95-
if(WIN32)
96-
set_target_properties(basic
97-
PROPERTIES
98-
LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRTD"
99-
)
100-
endif()

src/geode/basic/progress_logger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace geode
7676
}
7777

7878
private:
79-
double nb_steps_;
79+
index_t nb_steps_;
8080
index_t current_{ 0 };
8181
absl::Time current_time_;
8282
absl::Mutex lock_;

src/geode/mesh/core/grid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ namespace geode
240240
}
241241
else
242242
{
243-
closest[d] = std::round( value );
243+
closest[d] = static_cast< index_t >( std::round( value ) );
244244
}
245245
}
246246
return closest;

tests/basic/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ add_geode_test(
6363
DEPENDENCIES
6464
${PROJECT_NAME}::basic
6565
)
66-
add_geode_test(
67-
SOURCE "test-progress-logger.cpp"
68-
DEPENDENCIES
69-
${PROJECT_NAME}::basic
70-
)
7166
add_geode_test(
7267
SOURCE "test-range.cpp"
7368
DEPENDENCIES

0 commit comments

Comments
 (0)