-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix when Compiling with non-standard CMake Configurations #8378
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6125dd0
fix ep_nocache_psychrometrics
mitchute cbd59a6
Merge branch 'develop' into fix_nocache_psychrometrics
mitchute 06c6420
add CMake to expose EP_nocache_Psychrometrics, add github actions bui…
mitchute cc00686
fix spelling, minor cleanups
mitchute 7ae4b99
fix CMake for USE_PSYCHROMETRICS_CACHING
mitchute 535426b
move from 'extern T const' to 'constexpr T' in Psychrometrics
mitchute 54dea14
Merge branch 'fix_nocache_psychrometrics' of github.com:NREL/EnergyPl…
mitchute 6bf662e
Merge branch 'develop' into fix_nocache_psychrometrics
mitchute 0d717cd
fix link_with_python=OFF
mitchute 9cdf1b6
test inline-ing cached_Tsat
mitchute 5d7c8a7
move to inline
mitchute dcc84f7
unify undef's
mitchute c4eecff
build energyplus_tests on GitHub
mitchute db33906
build energyplus_tests on GitHub
mitchute abff040
set BUILD_TESTING=ON
mitchute 9924a3f
Merge branch 'develop' into fix_nocache_psychrometrics
mitchute 3456a4d
turn off build_testing on github, move CMake option up
mitchute 04a4e32
Merge branch 'fix_nocache_psychrometrics' of github.com:NREL/EnergyPl…
mitchute 398c23f
add USE_GLYCOL_CACHE CMake option and build with GH actions
mitchute bebdc79
Merge branch 'develop' into fix_nocache_psychrometrics
mitchute ad5a9bc
OPENGL_REQUIRED=OFF to GH actions builds
mitchute 5571721
add USE_PSYCH_CACHE CMake option, fix build, add to GH actions builds
mitchute 3f8f345
move EP_psych_errors to CMake options, add GH actions build, minor fo…
mitchute 955c837
fix Mac unittests build
mitchute 0be9c78
add USE_PSYCH_ERRORS CMake to unittest builds
mitchute File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
name: Mac Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
python_no_psychcach: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Create Build Directory | ||
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/build | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -DLINK_WITH_PYTHON=ON -DUSE_PSYCHROMETRICS_CACHING=OFF .. | ||
|
||
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 | ||
|
||
no_python_psychcach: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Create Build Directory | ||
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/build | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -DLINK_WITH_PYTHON=OFF -DUSE_PSYCHROMETRICS_CACHING=ON .. | ||
|
||
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 | ||
|
||
no_python_no_psychcach: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Create Build Directory | ||
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/build | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -DLINK_WITH_PYTHON=OFF -DUSE_PSYCHROMETRICS_CACHING=OFF .. | ||
|
||
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 | ||
|
||
no_glcol_cache: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Create Build Directory | ||
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/build | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -DUSE_GLYCOL_CACHING=OFF .. | ||
|
||
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 | ||
|
||
no_opengl: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Create Build Directory | ||
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/build | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -OPENGL_REQUIRED=OFF .. | ||
|
||
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 | ||
|
||
use_psych_stats: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Create Build Directory | ||
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/build | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -USE_PSYCH_STATS=ON .. | ||
|
||
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 | ||
|
||
no_use_psych_errors: | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Create Build Directory | ||
run: cmake -E make_directory ${{runner.workspace}}/EnergyPlus/build | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
run: cmake -DCMAKE_BUILD_TYPE=Release -USE_PSYCH_ERRORS=OFF .. | ||
|
||
- name: Build EnergyPlus | ||
working-directory: ${{runner.workspace}}/EnergyPlus/build | ||
shell: bash | ||
run: cmake --build . --target energyplus -j 2 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,10 @@ endif() | |
option( BUILD_PACKAGE "Build package" OFF ) | ||
option( BUILD_TESTING "Build testing targets" OFF ) | ||
option( BUILD_FORTRAN "Build Fortran stuff" OFF ) | ||
option( USE_PSYCHROMETRICS_CACHING "Use psychrometrics cashing routines" ON ) | ||
option( USE_GLYCOL_CACHING "Use glycol cashing routines" ON ) | ||
option( USE_PSYCH_STATS "Compute psychrometric stats" OFF ) | ||
option( USE_PSYCH_ERRORS "Report psychrometric errors " ON ) | ||
|
||
####################################################################### | ||
|
||
|
@@ -392,3 +396,7 @@ mark_as_advanced(BUILD_GMOCK) | |
mark_as_advanced(BUILD_GTEST) | ||
mark_as_advanced(gmock_build_tests) | ||
mark_as_advanced(BUILD_WCE_TESTING) | ||
mark_as_advanced(USE_PSYCHROMETRICS_CACHING) | ||
mark_as_advanced(USE_GLYCOL_CACHING) | ||
mark_as_advanced(USE_PSYCH_STATS) | ||
mark_as_advanced(USE_PSYCH_ERRORS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's really great having some new CMake (advanced) variables for turning compiler settings on and off. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,7 +132,7 @@ namespace PluginManagement { | |
return "Linked to Python Version: \"" + sVersion + "\""; | ||
} | ||
#else | ||
std::string pythonStringForUsage(EnergyPlusData &state) | ||
std::string pythonStringForUsage([[maybe_unused]] EnergyPlusData &state) | ||
{ | ||
return "This version of EnergyPlus not linked to Python library."; | ||
} | ||
|
@@ -1093,7 +1093,7 @@ namespace PluginManagement { | |
} | ||
} | ||
#else | ||
void PluginManager::addToPythonPath([[maybe_unused]] EnergyPlusData &state, const std::string &EP_UNUSED(path), bool EP_UNUSED(userDefinedPath)) | ||
void PluginManager::addToPythonPath([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] const std::string &path, [[maybe_unused]] bool userDefinedPath) | ||
{ | ||
} | ||
#endif | ||
|
@@ -1135,8 +1135,8 @@ namespace PluginManagement { | |
} | ||
#else | ||
int PluginManager::getGlobalVariableHandle([[maybe_unused]] EnergyPlusData &state, | ||
const std::string &EP_UNUSED(name), | ||
bool const EP_UNUSED(suppress_warning)) | ||
[[maybe_unused]] const std::string &name, | ||
[[maybe_unused]] bool const suppress_warning) | ||
{ | ||
return -1; | ||
} | ||
|
@@ -1306,7 +1306,7 @@ namespace PluginManagement { | |
return 0.0; | ||
} | ||
#else | ||
Real64 PluginManager::getGlobalVariableValue([[maybe_unused]] EnergyPlusData &state, int EP_UNUSED(handle)) | ||
Real64 PluginManager::getGlobalVariableValue([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle) | ||
{ | ||
return 0.0; | ||
} | ||
|
@@ -1328,7 +1328,7 @@ namespace PluginManagement { | |
} | ||
} | ||
#else | ||
void PluginManager::setGlobalVariableValue([[maybe_unused]] EnergyPlusData &state, int EP_UNUSED(handle), Real64 EP_UNUSED(value)) | ||
void PluginManager::setGlobalVariableValue([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] int handle, [[maybe_unused]] Real64 value) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yay for fixed syntax errors! |
||
{ | ||
} | ||
#endif | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic!