Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
kbenne committed Mar 2, 2015
2 parents f2b9864 + 54e3769 commit aa1e951
Show file tree
Hide file tree
Showing 283 changed files with 20,797 additions and 3,836 deletions.
6 changes: 3 additions & 3 deletions .decent_ci-Linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ compilers:
release_build_training_cmake_extra_flags: -DPROFILE_GENERATE:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF
release_build_training_ctest_filter: -R "integration.(RefBldg.*|.*Slab|.*[^g]Basement|.*5Zone.*|Rad|Pip|.*Network.*|Window|CentralChillerHeaterSystem_Cooling_Heating|CmplxGlz_.*|ConvectionAdaptiveSmallOffice|DElight.*|DaylightingDevice.*|DisplacementVent_Nat_AirflowNetwork_AdaptiveComfort|DOADualDuctSchool|EMS.*|Flr_Rf_8Sides|FluidCooler|GSHP.*|GeneratorswithPV|HeatPumpWaterToAir.*|HospitalBaselineReheatReportEMS|HospitalLowEnergy|MicroCogeneration|PlantApplicationsGuide.*|PlateHeatExchanger|PurchAirWithDaylighting|RefrigeratedWarehouse|SolarCollectorFlatPlateWater|SurfaceTest|ThermalChimneyTest|UserDefinedRoomAirPatterns|VSHeatPumpWaterToAirEquationFit|WaterHeater.*|_CTFTestsPart2|_HybridVentilationControlGlobalAN|CentralChillerHeaterSystem)"
release_build_cmake_extra_flags: -DPROFILE_GENERATE:BOOL=OFF -DPROFILE_USE:BOOL=ON -DENABLE_LTO:BOOL=OFF -DENABLE_REGRESSION_TESTING:BOOL=ON
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF

- name: cppcheck
compiler_extra_flags: --enable=warning --suppress="*:*gtest*" --suppress="constStatement:*Objex*" --suppress="cppcheckError:*" --suppress="uninitvar:*" --suppress="syntaxError:*" --suppress="*:*sqlite*" --suppress="invalidscanf:*DElight*" --suppress="uninitMemberVar:*DElight*" --suppress="invalidScanfArgType_int:*DElight*"
Expand All @@ -15,7 +15,7 @@ compilers:
version: "4.8"
build_type: Debug
build_package_generator: "STGZ"
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 2.32
Expand All @@ -31,7 +31,7 @@ compilers:
version: "4.8"
build_type: Debug
build_package_generator: "STGZ"
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=OFF -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_COVERAGE:BOOL=ON -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
coverage_enabled: true
coverage_base_dir: src/EnergyPlus
coverage_pass_limit: 68.88
Expand Down
2 changes: 1 addition & 1 deletion .decent_ci-MacOS.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
compilers:
- name: clang
release_build_cmake_extra_flags: -DENABLE_LTO:BOOL=ON
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA
cmake_extra_flags: -DBUILD_FORTRAN=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=$REGRESSION_BASELINE -DREGRESSION_SCRIPT_PATH:PATH=$REGRESSION_DIR -DREGRESSION_BASELINE_SHA:STRING=$REGRESSION_BASELINE_SHA -DCOMMIT_SHA=$COMMIT_SHA -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF

4 changes: 2 additions & 2 deletions .decent_ci-Windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ compilers:
version: 12
release_build_enable_pgo: false
release_build_cmake_extra_flags: -DENABLE_LTO:BOOL=ON
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA%
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA% -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF
- name: Visual Studio
version: 12
architecture: Win64
release_build_enable_pgo: false
release_build_cmake_extra_flags: -DENABLE_LTO:BOOL=ON
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA%
cmake_extra_flags: -DBUILD_FORTRAN:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DENABLE_REGRESSION_TESTING:BOOL=ON -DREGRESSION_BASELINE_PATH:PATH=%REGRESSION_BASELINE% -DREGRESSION_SCRIPT_PATH:PATH=%REGRESSION_DIR% -DREGRESSION_BASELINE_SHA:STRING=%REGRESSION_BASELINE_SHA% -DCOMMIT_SHA=%COMMIT_SHA% -DENABLE_GTEST_DEBUG_MODE:BOOL=OFF



Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}

set( CMAKE_VERSION_MAJOR 8 )
set( CMAKE_VERSION_MINOR 2 )
set( CMAKE_VERSION_PATCH 8 )
set( CMAKE_VERSION_PATCH 9 )

set( ENERGYPLUS_VERSION "${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}" )

Expand Down Expand Up @@ -43,6 +43,9 @@ set(CPACK_PACKAGE_CONTACT "Kyle Benne <[email protected]>")
option( BUILD_PACKAGE "Build package" OFF )
option( BUILD_TESTING "Build testing targets" OFF )
option( BUILD_FORTRAN "Build Fortran stuff" OFF )
# Turning ENABLE_GTEST_DEBUG_MODE ON will cause assertions and exceptions to halt the test case and unwind.
# Turn this option OFF for automated testing.
option( ENABLE_GTEST_DEBUG_MODE "Enable options to help debug test failures" ON )

if( BUILD_TESTING )
option( ENABLE_REGRESSION_TESTING "Enable Regression Tests" OFF )
Expand Down Expand Up @@ -84,6 +87,10 @@ if (MSVC)
set(gtest_force_shared_crt ON)
endif()

if (MINGW)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
endif ()

set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Products" )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Products" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Products" )
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ The C++ code in EnergyPlus utilizes many C++11 features, and so a modern compile
6. Check the configuration settings, keeping them default should suffice, and click Generate.
7. Browse to the build folder and there will be a Visual Studio solution file you can click on, EnergyPlus.sln. It will include multiple projects for each build target. Choose the type of build (Debug or Release), then right click on EnergyPlus in the solution explorer and "Build". This will build EnergyPlus and all of its dependencies. The target executables will be found in the Products subfolder.
8. The solution will include the ZERO_CHECK project as the default target to run when you execute, so when you are ready to debug, manually set the default target to EnergyPlus.
9. In the EnergyPlus and EnergyPlusLib projects: right click on each project and select Properties. Under Configuration Properties select Debugging. In the Enviroment field, enter ```_NO_DEBUG_HEAP=1```. The debug heap in Visual Studio doesn't play nicely with the input processor in EnergyPlus, and for debug builds, skipping this will result in a _very_ long IDD reading time.
9. In the EnergyPlus and EnergyPlusLib projects: right click on each project and select Properties. Under Configuration Properties select Debugging. In the Environment field, enter ```_NO_DEBUG_HEAP=1```. The debug heap in Visual Studio doesn't play nicely with the input processor in EnergyPlus, and for debug builds, skipping this will result in a _very_ long IDD reading time.
10. For the EnergyPlus project, right click on the project and select Properties. Under Configuration Properties select Debugging. In the Working Directory field, enter $(SolutionDir)\Products. This is the target path for the Energy+.idd file and will be the working directory for interactive debugging. Put in.idf, in.epw and the like here. Or enter command line arguments in the Command Arguments field to specify the locations of files.

## Linux

Expand Down Expand Up @@ -61,5 +62,5 @@ These instructions were written for Mac OS X Version 10.9. Newer versions of OS

# Building Installer Packages

Buildling an installer package is simply a matter of compiling the "Package" target. On Windows you must have the NSIS tool installed first. On Mac you must install PackageMaker. Once the appropriate packaging tool is installed, use the CMake interface to turn on the "BUILD\_PACKAGE" option and regenerate the project. A separate repository contains many binary pieces that are downloaded during the process of compilling the installer. These are being transitioned to build from source where possible, in which case they will end up in this repository along with the other source. Because this content is automatically downloaded from a separate GitHub repository during the packaging process, you will need to have an internet connection while generating an installer. The completed installer package will be copied into the root of the build directory.
Building an installer package is simply a matter of compiling the "Package" target. On Windows you must have the NSIS tool installed first. On Mac you must install PackageMaker. Once the appropriate packaging tool is installed, use the CMake interface to turn on the "BUILD\_PACKAGE" option and regenerate the project. A separate repository contains many binary pieces that are downloaded during the process of compiling the installer. These are being transitioned to build from source where possible, in which case they will end up in this repository along with the other source. Because this content is automatically downloaded from a separate GitHub repository during the packaging process, you will need to have an internet connection while generating an installer. The completed installer package will be copied into the root of the build directory.

4 changes: 2 additions & 2 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ configure_file(cmake/license.in.txt "${CMAKE_BINARY_DIR}/license.txt" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/license.txt" DESTINATION "./")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/license.txt")

install( FILES "${CMAKE_BINARY_DIR}/Energy+.idd" DESTINATION ./ )
install( FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Energy+.idd" DESTINATION ./ )

# Install files that are in the current repo
INSTALL(FILES "${CMAKE_SOURCE_DIR}/datasets/AirCooledChiller.idf" DESTINATION "./DataSets")
Expand Down Expand Up @@ -150,7 +150,7 @@ install_remote(FILES "https://raw.github.com/NREL/EnergyPlusBuildSupport/v8.2.0/
install_remote(FILES "https://raw.github.com/NREL/EnergyPlusBuildSupport/v8.2.0/release/${RULES_XLS}" "./")
install_remote(FILES "https://raw.github.com/NREL/EnergyPlusBuildSupport/v8.2.0/release/Report%20Variables%208-1-0-009%20to%208-2-0.csv" "PreProcess/IDFVersionUpdater/" "Report Variables 8-1-0-009 to 8-2-0.csv")
install(FILES "${CMAKE_SOURCE_DIR}/idd/V8-1-0-Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater/")
install( FILES "${CMAKE_BINARY_DIR}/Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater/" RENAME "V${CMAKE_VERSION_MAJOR}-${CMAKE_VERSION_MINOR}-${CMAKE_VERSION_PATCH}-Energy+.idd" )
install( FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Energy+.idd" DESTINATION "PreProcess/IDFVersionUpdater/" RENAME "V${CMAKE_VERSION_MAJOR}-${CMAKE_VERSION_MINOR}-${CMAKE_VERSION_PATCH}-Energy+.idd" )
install_remote(FILES "https://raw.github.com/NREL/EnergyPlusBuildSupport/v8.2.0/release/VariableNameListAudit.xlsx" "./")
install_remote(FILES "https://raw.github.com/NREL/EnergyPlusBuildSupport/v8.2.0/bin/CurveFitTools/IceStorageCurveFitTool.xlsm" "PreProcess/HVACCurveFitTool/")

Expand Down
5 changes: 4 additions & 1 deletion cmake/ProjectMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ macro( CREATE_TEST_TARGETS BASE_NAME SRC DEPENDENCIES )
if( BUILD_TESTING )
add_executable( ${BASE_NAME}_tests ${SRC} )

if( ENABLE_GTEST_DEBUG_MODE )
set_target_properties(${BASE_NAME}_tests PROPERTIES COMPILE_DEFINITIONS ENABLE_GTEST_DEBUG_MODE)
endif()

CREATE_SRC_GROUPS( "${SRC}" )

get_target_property(BASE_NAME_TYPE ${BASE_NAME} TYPE)
Expand All @@ -103,7 +107,6 @@ macro( CREATE_TEST_TARGETS BASE_NAME SRC DEPENDENCIES )
target_link_libraries( ${BASE_NAME}_tests
${ALL_DEPENDENCIES}
gtest
gtest_main
)

ADD_GOOGLE_TESTS( ${BASE_NAME}_tests ${SRC} )
Expand Down
Loading

7 comments on commit aa1e951

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-MacOS-10.9-clang: OK (1614 of 1614 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - i386-Windows-7-VisualStudio-12: OK (1620 of 1620 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - Win64-Windows-7-VisualStudio-12: OK (1620 of 1620 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (1620 of 1620 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (622 of 622 tests passed)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

iteration (kbenne) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1122 of 1122 tests passed)

Build Badge Test Badge Coverage Badge

Please sign in to comment.