Skip to content

Commit 38de5b8

Browse files
committed
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into Test-fill-numeric-defaults
2 parents 14f4cab + 6fafbb7 commit 38de5b8

File tree

1,572 files changed

+13825
-16434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,572 files changed

+13825
-16434
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ add_library(project_fp_options INTERFACE)
5959

6060
add_library(project_warnings INTERFACE)
6161

62+
add_library(turn_off_warnings INTERFACE)
63+
6264
set(THREADS_PREFER_PTHREAD_FLAG ON)
6365
find_package(Threads)
6466
target_link_libraries(project_options INTERFACE Threads::Threads)
@@ -174,6 +176,7 @@ endif()
174176

175177
# we are making *a Python 3.6 Interpreter* a required dependency, so find it here
176178
# If LINK_WITH_PYTHON, also request the Development (libs) at the same time, to ensure consistent version between interpreter and Development
179+
# and ask for at least 3.8 (for the PyConfig stuff).
177180
if(LINK_WITH_PYTHON)
178181
# find_package(Python) has the problem that on github actions in particular it'll pick up the most recent python (eg 3.9) from the tool cache
179182
# even if you have used the setup-python action and set it to 3.8, so we make the exact version required
@@ -184,7 +187,7 @@ if(LINK_WITH_PYTHON)
184187
if(Python_REQUIRED_VERSION)
185188
find_package(Python ${Python_REQUIRED_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED)
186189
else()
187-
find_package(Python 3.6 COMPONENTS Interpreter Development REQUIRED)
190+
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
188191
endif()
189192
else()
190193
find_package(Python 3.6 COMPONENTS Interpreter REQUIRED)
@@ -264,7 +267,7 @@ add_subdirectory(third_party)
264267
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/src)
265268
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party)
266269
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/fmt-8.0.1/include)
267-
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/btwxt/src)
270+
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/btwxt/include)
268271
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/re2)
269272
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/doj)
270273
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/nlohmann)

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
1+
EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
22

33
NOTICE: This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.
44

cmake/CompilerFlags.cmake

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ if(MSVC AND NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")) # Visual C++ (VS
7777
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:/RTCsu>) # Runtime checks
7878
target_compile_options(project_fp_options INTERFACE $<$<CONFIG:Debug>:/fp:strict>) # Floating point model
7979
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:/DMSVC_DEBUG>) # Triggers code in main.cc to catch floating point NaNs
80+
81+
target_compile_options(turn_off_warnings INTERFACE /W0)
82+
8083
elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # g++/Clang
8184

8285
# TODO: after we fix all test, enable this by default on Debug builds
@@ -86,9 +89,10 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O
8689

8790
# COMPILER FLAGS
8891
target_compile_options(project_options INTERFACE -pipe) # Faster compiler processing
89-
target_compile_options(project_warnings INTERFACE -Wpedantic
90-
)# Turn on warnings about constructs/situations that may be non-portable or outside of the standard
91-
target_compile_options(project_warnings INTERFACE -Wall -Wextra) # Turn on warnings
92+
target_compile_options(project_warnings INTERFACE -Wpedantic)
93+
# Turn on warnings about constructs/situations that may be non-portable or outside of the standard
94+
target_compile_options(project_warnings INTERFACE -Wall) # Turn on warnings
95+
target_compile_options(project_warnings INTERFACE -Wextra) # Turn on warnings
9296
target_compile_options(project_warnings INTERFACE -Wno-unknown-pragmas)
9397
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0)
9498
target_compile_options(project_warnings INTERFACE -Wno-deprecated-copy)
@@ -101,6 +105,16 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O
101105
target_compile_options(project_warnings INTERFACE -Wno-unused-but-set-parameter -Wno-unused-but-set-variable)
102106
target_compile_options(project_warnings INTERFACE -Wno-maybe-uninitialized)
103107
target_compile_options(project_warnings INTERFACE -Wno-aggressive-loop-optimizations)
108+
# Sadly, GCC 13.2 is throwing many false positives on dangling references and compile time array-bounds
109+
# https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=6b927b1297e66e26e62e722bf15c921dcbbd25b9
110+
# https://trofi.github.io/posts/264-gcc-s-new-Wdangling-reference-warning.html
111+
target_compile_options(project_warnings INTERFACE -Wno-dangling-reference)
112+
# The array-bounds appears to be problematic as well depending on the optimization level chosen
113+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100430
114+
target_compile_options(project_warnings INTERFACE -Wno-array-bounds)
115+
# depending on the level of overflow check selected, the stringop-overflow can also emit false positives
116+
# https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overflow
117+
target_compile_options(project_warnings INTERFACE -Wno-stringop-overflow)
104118
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
105119
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
106120
# Suppress unused-but-set warnings until more serious ones are addressed
@@ -139,6 +153,8 @@ elseif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" O
139153
target_compile_options(project_options INTERFACE $<$<CONFIG:Release>:-fno-stack-protector>)
140154
# ADD_CXX_RELEASE_DEFINITIONS("-Ofast") # -Ofast (or -ffast-math) needed to auto-vectorize floating point loops
141155

156+
target_compile_options(turn_off_warnings INTERFACE -w)
157+
142158
elseif(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
143159

144160
# Disabled Warnings: Enable some of these as more serious warnings are addressed
@@ -192,6 +208,8 @@ elseif(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
192208
target_compile_options(project_fp_options INTERFACE $<$<CONFIG:Debug>:/Qfp-stack-check>)
193209
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:/traceback>) # Enables traceback on error
194210

211+
target_compile_options(turn_off_warnings INTERFACE /w)
212+
195213
elseif(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
196214

197215
# Disabled Warnings: Enable some of these as more serious warnings are addressed
@@ -237,6 +255,7 @@ elseif(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
237255
target_compile_options(project_fp_options INTERFACE $<$<CONFIG:Debug>:-fp-stack-check>) # Check the floating point stack after every function call
238256
target_compile_options(project_options INTERFACE $<$<CONFIG:Debug>:-traceback>) # Enables traceback on error
239257

258+
target_compile_options(turn_off_warnings INTERFACE -w)
240259
endif() # COMPILER TYPE
241260

242261
# Add Color Output if Using Ninja:

cmake/PythonCopyStandardLib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University
1+
# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University
22
# of Illinois, The Regents of the University of California, through Lawrence
33
# Berkeley National Laboratory (subject to receipt of any required approvals
44
# from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-

cmake/PythonGetBitSize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University
1+
# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University
22
# of Illinois, The Regents of the University of California, through Lawrence
33
# Berkeley National Laboratory (subject to receipt of any required approvals
44
# from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-

cmake/ReverseDDPostProcess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University
1+
# EnergyPlus, Copyright (c) 1996-2024, The Board of Trustees of the University
22
# of Illinois, The Regents of the University of California, through Lawrence
33
# Berkeley National Laboratory (subject to receipt of any required approvals
44
# from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-

0 commit comments

Comments
 (0)