Skip to content

Fix #11680 - Completely Remove the use of link_options / add_compile_options in third_party#11683

Merged
mitchute merged 14 commits into
developfrom
11680_siloed_third_party
Jul 19, 2026
Merged

Fix #11680 - Completely Remove the use of link_options / add_compile_options in third_party#11683
mitchute merged 14 commits into
developfrom
11680_siloed_third_party

Conversation

@jmarrec

@jmarrec jmarrec commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Pull request overview

Description of the purpose of this PR

  • Remove global link_options/add_compile_options calls and use target_link_libraries to link project_options / projects_fp_options as needed, and PRIVATE always to make sure it doesn't leak
  • I had to modify some third party cmakelists to transition them from the non-keyword target_link_libraries (old style) to the new keyword version
  • I had to modify airflownetworklib to explicitly link to project_options since it wouldn't find E+ headers anymore
    • Also added project_warnings there and had to fix a few

Add an advanced ENABLE_WARNINGS_IN_THIRD_PARTY option (default OFF):

  • OFF (default): every third-party target now explictly links turn_off_warnings (-w), fully silencing the compiler for vendored code so warnings don't keep showing up as we upgrade compiler versions
    • the add_subdirectory(third_party SYSTEM) only suppresses warnings for headers you are importing in your own code, it wont silence warnings from building third_party libs themselves.
  • ON: most third-party targets link project_warnings plus a new warnings_as_not_error target (-Wno-error / WX-) so the extra diagnostics surface without turning -Werror on vendored code into hard build failures. This is useful for sanity once in a while

I fixed a few hard warnings such as K&R style deprecation in C code in third_party while I was at it

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies
  • If adding/removing any output files (e.g., eplustbl.*)
    • Update ..\scripts\Epl-run.bat
    • Update ..\scripts\RunEPlus.bat
    • Update ..\src\EPLaunch\ MainModule.bas, epl-ui.frm, and epl.vbp (VersionComments)
    • Update ...github\workflows\energyplus.py

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

jmarrec added 9 commits July 10, 2026 13:07
… advanced option ENABLE_WARNINGS_IN_THIRD_PARTY

third_party was doing link_libraries and add_compile_options global calls, which leaks everywhere downstream
We use target_link_libraries specifically now.

third_party/CMakeLists.txt used to apply project_options and project_fp_options to every subsequently-added target via directory-scoped
link_libraries() calls. Because that's the plain (default-PUBLIC) form, it silently propagated project_options' interface requirements -- most
importantly the ${PROJECT_SOURCE_DIR}/src include dir and -Werror -- to anything that happened to link a third-party target, whether or not that
consumer asked for it.

Each third-party target now links project_options and project_fp_options explicitly and PRIVATE, tracked in a new all_third_party_targets list so the warning-suppression loop below doesn't need to be updated by hand every time a target is added.

Add an advanced ENABLE_WARNINGS_IN_THIRD_PARTY option (default OFF):
- OFF (default): every third-party target links turn_off_warnings (-w),   fully silencing the compiler for vendored code, same as before.
- ON: most third-party targets link project_warnings plus a new  warnings_as_not_error target (-Wno-error / /WX-) so the extra diagnostics
  surface without turning -Werror on vendored code into hard build failures.  This is useful for sanity once in a while

Fix ssc/ssc/CMakeLists.txt's own target_link_libraries calls to use the PUBLIC keyword form (matching upstream) instead of the plain signature -- CMake forbids mixing plain and keyword signatures for the same target, and this file already needed one or the other once third_party/CMakeLists.txt started using keywords.

Also normalize third_party/FMUParser/CMakeLists.txt to lowercase commands and the keyword target_link_libraries signature, since parser needed the
same signature fix.
…ject_warnings currently as it won't build with it

[ 97%][154/158] Building CXX object src/EnergyPlus/AirflowNetwork/CMakeFiles/airflownetworklib.dir/src/Elements.cpp.o
/home/julien/Software/Others/EnergyPlus2/src/EnergyPlus/AirflowNetwork/src/Elements.cpp:448:49: warning: unused parameter 'state' [-Wunused-parameter]
  448 |     int SurfaceCrack::calculate(EnergyPlusData &state,
      |                                                 ^
/home/julien/Software/Others/EnergyPlus2/src/EnergyPlus/AirflowNetwork/src/Elements.cpp:787:42: warning: unused parameter 'i' [-Wunused-parameter]
  787 |                                int const i,                              // Linkage number
      |                                          ^
/home/julien/Software/Others/EnergyPlus2/src/EnergyPlus/AirflowNetwork/src/Elements.cpp:1074:37: warning: unused parameter 'i' [-Wunused-parameter]
 1074 |                           int const i,                              // Linkage number
      |                                     ^
3 warnings generated.
[ 98%][155/158] Building CXX object src/EnergyPlus/AirflowNetwork/CMakeFiles/airflownetworklib.dir/src/Solver.cpp.o
/home/julien/Software/Others/EnergyPlus2/src/EnergyPlus/AirflowNetwork/src/Solver.cpp:147:45: warning: field 'm_state' will be initialized after field 'properties' [-Wreorder-ctor]
  147 |     Solver::Solver(EnergyPlusData &state) : m_state(state), properties(state)
      |                                             ^~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~
      |                                             properties(state) m_state(state)
/home/julien/Software/Others/EnergyPlus2/src/EnergyPlus/AirflowNetwork/src/Solver.cpp:10742:17: warning: unused variable 'j' [-Wunused-variable]
 10742 |             int j = AirflowNetworkLinkageData(i).NodeNums[0];
       |                 ^
/home/julien/Software/Others/EnergyPlus2/src/EnergyPlus/AirflowNetwork/src/Solver.cpp:10743:17: warning: unused variable 'k' [-Wunused-variable]
 10743 |             int k = AirflowNetworkLinkageData(i).NodeNums[1];
       |                 ^
/home/julien/Software/Others/EnergyPlus2/src/EnergyPlus/AirflowNetwork/src/Solver.cpp:13393:78: warning: unused parameter 'state' [-Wunused-parameter]
 13393 |     bool OccupantVentilationControlProp::closing_probability(EnergyPlusData &state,
       |                                                                              ^
4 warnings generated.
[100%][158/158] Linking CXX static library Products/libairflownetworklib.a
@jmarrec jmarrec self-assigned this Jul 10, 2026
@jmarrec jmarrec added Defect Includes code to repair a defect in EnergyPlus Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) labels Jul 10, 2026
Comment thread cmake/CompilerFlags.cmake
# COMPILER FLAGS
target_compile_options(project_options INTERFACE -pipe) # Faster compiler processing
target_compile_options(project_options INTERFACE -Werror) # Compiler Driven Development
target_compile_options(project_warnings INTERFACE -Werror) # Compiler Driven Development

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I move Werror from project_options to project_warnings, that makes more sense.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable

Comment thread cmake/CompilerFlags.cmake
# ADD_CXX_RELEASE_DEFINITIONS("-Ofast") # -Ofast (or -ffast-math) needed to auto-vectorize floating point loops

target_compile_options(turn_off_warnings INTERFACE -w)
target_compile_options(warnings_as_not_error INTERFACE -Wno-error) # Disable treating warnings as errors

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New interface lib for not treating as an error (overwrites -Werror as long as it's linked after the project_warnings)

Comment thread CMakeLists.txt
Comment on lines +75 to +77
# Useful for checking once in a while if a third-party library is generating scary warnings, but too noisy for normal development
option(ENABLE_WARNINGS_IN_THIRD_PARTY "Enable warnings in third-party libraries" OFF)
mark_as_advanced(ENABLE_WARNINGS_IN_THIRD_PARTY)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new option, OFF, advanced

Comment thread CMakeLists.txt
mark_as_advanced(ENABLE_WARNINGS_IN_THIRD_PARTY)

add_library(turn_off_warnings INTERFACE)
add_library(warnings_as_not_error INTERFACE) # -Wno-error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new interface lib declared here

# END of INTERFACE targets

# SAM Is included up here to make sure it doesn't get the C++17 flags
set(all_third_party_targets "")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For convenience later when linking the warning/no warnings libs, I collect the libs into a list

void change_file_date(filename, dosdate, tmu_date) const char *filename;
uLong dosdate;
tm_unz tmu_date;
void change_file_date(const char* filename, uLong dosdate, tm_unz tmu_date)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the K&R style here, then I also aligned from FMU's copy and FMI's copy to match, picking left and right as needed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL K&R style

Comment on lines +339 to +342
for (StdIntMap::iterator it2 = entry.parents->begin();
it2 != entry.parents->end();
++it2) {
int j = it2->first;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An iterator override in a nested loop, worth fixing.

Our re2 copy is ancient FYI

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we have a handful of outdated third-party libs.

Comment on lines +231 to +239
target_link_libraries(ssc PUBLIC ${name})
endforeach()

if (UNIX)
find_package(Threads REQUIRED)
target_link_libraries(ssc Threads::Threads ${CMAKE_DL_LIBS})
target_link_libraries(ssc PUBLIC Threads::Threads ${CMAKE_DL_LIBS})
find_library(MATH_LIBRARY m)
if(MATH_LIBRARY)
target_link_libraries(ssc ${MATH_LIBRARY})
target_link_libraries(ssc PUBLIC ${MATH_LIBRARY})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssc is now using the keyword-based target_link_libraries, so I can link PRIVATE to the warnings / turn_off_warnings

add_executable(parser ${SRC})

TARGET_LINK_LIBRARIES( parser epexpat miniziplib )
target_link_libraries(parser PRIVATE epexpat miniziplib)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SAme for FMUParser (I also linted the CMake code, and used POSITION_INDEPENDENT_CODE)


target_include_directories(airflownetworklib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(airflownetworklib PUBLIC objexx PRIVATE btwxt nlohmann_json re2 Windows-CalcEngine)
target_link_libraries(airflownetworklib PUBLIC objexx PRIVATE btwxt nlohmann_json re2 Windows-CalcEngine project_options project_fp_options project_warnings)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFN was getting project_options from third_party...

It wouldn't build with project_warnings, so I fixed a couple of minor things, mostly Wunused-parameter, Unused variable, and a Ctor member initialization order

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jmarrec added 3 commits July 10, 2026 15:20
```
[ 40%][2/5] Building CXX object src\EnergyPlus\AirflowNetwork\CMakeFiles\airflownetworklib.dir\src\Elements.cpp.obj
cl : Command line warning D9025 : overriding '/WX' with '/WX-'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(113): warning C4458: declaration of 'A1' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Elements.hpp(1001): note: see declaration of 'EnergyPlus::AirflowNetwork::Duct::A1'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(125): warning C4458: declaration of 'g' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Elements.hpp(1000): note: see declaration of 'EnergyPlus::AirflowNetwork::Duct::g'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(262): warning C4458: declaration of 'A1' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Elements.hpp(1001): note: see declaration of 'EnergyPlus::AirflowNetwork::Duct::A1'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(274): warning C4458: declaration of 'g' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Elements.hpp(1000): note: see declaration of 'EnergyPlus::AirflowNetwork::Duct::g'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(722): warning C4458: declaration of 'AirLoopNum' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Elements.hpp(1096): note: see declaration of 'EnergyPlus::AirflowNetwork::ConstantVolumeFan::AirLoopNum'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(1847): warning C4458: declaration of 'OpenFactor' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Elements.hpp(536): note: see declaration of 'EnergyPlus::AirflowNetwork::SimpleOpening::OpenFactor'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(1521) : warning C4701: potentially uninitialized local variable 'WFact' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(1522) : warning C4701: potentially uninitialized local variable 'HFact' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(1523) : warning C4701: potentially uninitialized local variable 'Cfact' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(1638) : warning C4701: potentially uninitialized local variable 'Lextra' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Elements.cpp(1707) : warning C4701: potentially uninitialized local variable 'Axishght' used
[ 60%][3/5] Building CXX object src\EnergyPlus\AirflowNetwork\CMakeFiles\airflownetworklib.dir\src\Solver.cpp.obj
cl : Command line warning D9025 : overriding '/WX' with '/WX-'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(4699): warning C4458: declaration of 'compnum' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(418): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::compnum'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(4837): warning C4458: declaration of 'compnum' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(418): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::compnum'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(4965): warning C4458: declaration of 'compnum' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(418): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::compnum'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14334): warning C4458: declaration of 'AU' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(454): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::AU'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14335): warning C4458: declaration of 'AD' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(453): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::AD'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14337): warning C4458: declaration of 'IK' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(452): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::IK'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14485): warning C4458: declaration of 'AU' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(454): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::AU'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14486): warning C4458: declaration of 'AD' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(453): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::AD'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14489): warning C4458: declaration of 'IK' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(452): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::IK'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14593): warning C4458: declaration of 'IK' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(452): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::IK'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14594): warning C4458: declaration of 'AU' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(454): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::AU'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(14595): warning C4458: declaration of 'AD' hides class member
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\include\AirflowNetwork/Solver.hpp(453): note: see declaration of 'EnergyPlus::AirflowNetwork::Solver::AD'
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(9119) : warning C4701: potentially uninitialized local variable 'RepOnOffFanRunTimeFraction' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(6715) : warning C4701: potentially uninitialized local variable 'PressureSet' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12027) : warning C4701: potentially uninitialized local variable 'X1' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12027) : warning C4701: potentially uninitialized local variable 'Y1' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12019) : warning C4701: potentially uninitialized local variable 'ZoneAng1' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12027) : warning C4701: potentially uninitialized local variable 'X2' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12027) : warning C4701: potentially uninitialized local variable 'Y2' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12019) : warning C4701: potentially uninitialized local variable 'ZoneAng2' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12838) : warning C4701: potentially uninitialized local variable 'Velocity' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(12964) : warning C4701: potentially uninitialized local variable 'Velocity' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(13086) : warning C4701: potentially uninitialized local variable 'Velocity' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(1465) : warning C4701: potentially uninitialized local variable 'inletNode' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(1466) : warning C4701: potentially uninitialized local variable 'outletNode' used
C:\src\EnergyPlus\src\EnergyPlus\AirflowNetwork\src\Solver.cpp(2237) : warning C4701: potentially uninitialized local variable 'NumAPL' used
[ 80%][4/5] Linking CXX static library Products\airflownetworklib.lib
```
… getting ffp-contract from third_party...

22
  1702: [ RUN      ] EnergyPlusFixture.OutputReportTabular_GatherHeatEmissionReport
  1702: /Users/runner/work/EnergyPlus/EnergyPlus/tst/EnergyPlus/unit/OutputReportTabular.unit.cc:3773: Failure
  1702: Expected equality of these values:
  1702:   2 * condenserReject * Constant::convertJtoGJ + coilReject * Constant::convertJtoGJ
  1702:     Which is: 0.00010831
  1702:   state->dataHeatBal->BuildingPreDefRep.emiHVACReject
  1702:     Which is: 0.00010831
  1/1 Test #1702: EnergyPlusFixture.OutputReportTabular_GatherHeatEmissionReport ...***Exception: SegFault  0.07 sec
@jmarrec
jmarrec force-pushed the 11680_siloed_third_party branch from 8eacdea to e103192 Compare July 10, 2026 14:12
I didn't get that C4127 on MSVC 2026 but CI reported it

And exclude a warning that is thrown anyways regardles off /W0 in shared (ssc)

@mitchute mitchute left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice set of cleanups. As long as everything builds and tests pass, this is ready.

Comment thread cmake/CompilerFlags.cmake
# COMPILER FLAGS
target_compile_options(project_options INTERFACE -pipe) # Faster compiler processing
target_compile_options(project_options INTERFACE -Werror) # Compiler Driven Development
target_compile_options(project_warnings INTERFACE -Werror) # Compiler Driven Development

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable

void change_file_date(filename, dosdate, tmu_date) const char *filename;
uLong dosdate;
tm_unz tmu_date;
void change_file_date(const char* filename, uLong dosdate, tm_unz tmu_date)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL K&R style

Comment on lines +339 to +342
for (StdIntMap::iterator it2 = entry.parents->begin();
it2 != entry.parents->end();
++it2) {
int j = it2->first;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we have a handful of outdated third-party libs.

Comment on lines -78 to -85
if(NOT MSVC)
add_compile_options(-Wno-pedantic -Wno-unused-parameter -Wno-unknown-pragmas)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-dangling-reference> $<$<COMPILE_LANGUAGE:CXX>:-Wno-restrict>)
endif()
else()
add_compile_options(/wd4267 /wd4996 /wd4068 /wd4244 /wd4589)
endif()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Comment on lines +266 to +276
foreach(target IN LISTS all_third_party_targets)
# Skip
if("${target}" IN_LIST skip_libs)
message(DEBUG "Skipping ${target} for project_warnings")
continue()
endif()

if(TARGET ${target})
target_link_libraries(${target} PRIVATE project_warnings warnings_as_not_error skip_common_warnings)
endif()
endforeach()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like having this option to toggle these.

@mitchute

Copy link
Copy Markdown
Collaborator

I built the Windows-debug-python config locally on this with #11699 merged in temporarily to confirm nothing is broken.

@mitchute
mitchute merged commit 39b3eed into develop Jul 19, 2026
8 checks passed
@mitchute
mitchute deleted the 11680_siloed_third_party branch July 19, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Completely Remove the use of link_options / add_compile_options in third_party

3 participants