Skip to content

Commit 5818fff

Browse files
authored
Merge branch 'main' into remove_overload
2 parents 1e78a40 + af194e2 commit 5818fff

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

CMakePresets.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"binaryDir": "${sourceDir}/cpp_build/${presetName}",
1010
"installDir": "${sourceDir}/install/${presetName}",
1111
"cacheVariables": {
12-
"PGM_ENABLE_DEV_BUILD": "ON"
12+
"PGM_ENABLE_DEV_BUILD": "ON",
13+
"PGM_MSVC_REPRODUCIBLE_BUILD": "OFF"
1314
},
1415
"environment": {
1516
"PLATFORM_C_FLAGS": "",
@@ -267,6 +268,7 @@
267268
},
268269
"cacheVariables": {
269270
"PGM_ENABLE_DEV_BUILD": "OFF",
271+
"PGM_MSVC_REPRODUCIBLE_BUILD": "ON",
270272
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "OFF",
271273
"CMAKE_SHARED_LINKER_FLAGS": "/debug:None /Brepro /INCREMENTAL:NO /LTCG /NOCOFFGRPINFO"
272274
}

power_grid_model_c/power_grid_model_c/CMakeLists.txt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ file(
3131

3232
target_link_libraries(power_grid_model_c PRIVATE power_grid_model)
3333

34-
target_compile_definitions(power_grid_model_c PRIVATE PGM_VERSION="${PGM_VERSION}")
34+
target_compile_definitions(
35+
power_grid_model_c
36+
PRIVATE PGM_VERSION="${PGM_VERSION}"
37+
)
3538

3639
target_sources(
3740
power_grid_model_c
@@ -44,13 +47,18 @@ target_sources(
4447

4548
set_target_properties(
4649
power_grid_model_c
47-
PROPERTIES
48-
VERSION ${PGM_VERSION}
49-
SOVERSION ${PGM_VERSION_MAJOR}
50-
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
51-
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE
50+
PROPERTIES VERSION ${PGM_VERSION} SOVERSION ${PGM_VERSION_MAJOR}
5251
)
5352

53+
if(NOT PGM_MSVC_REPRODUCIBLE_BUILD)
54+
set_target_properties(
55+
power_grid_model_c
56+
PROPERTIES
57+
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
58+
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE
59+
)
60+
endif()
61+
5462
install(
5563
TARGETS power_grid_model_c
5664
EXPORT power_grid_modelTargets

0 commit comments

Comments
 (0)