Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into MinGWbuild
Browse files Browse the repository at this point in the history
Conflicts:
	src/EnergyPlus/EnergyPlusPgm.cc
  • Loading branch information
jasondegraw committed Feb 25, 2015
2 parents 79cf62d + 8552bc1 commit 0b5170c
Show file tree
Hide file tree
Showing 488 changed files with 26,741 additions and 10,675 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=ON -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
17 changes: 10 additions & 7 deletions 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 @@ -182,14 +185,14 @@ endif()


set(OPTIMIZABLE_TARGETS
sqlite objexx bcvtb epexpat epfmiimport miniziplib DElight EnergyPlus EnergyPlusAPI EnergyPlusLib EnergyPlusLib2
sqlite objexx bcvtb epexpat epfmiimport miniziplib DElight energyplus energyplusapi energypluslib energypluslib2
)
if(NOT APPLE AND NOT MSVC)
list(APPEND OPTIMIZABLE_TARGETS parser)
endif()

if(NOT MSVC)
list(APPEND OPTIMIZABLE_TARGETS objexx_tests EnergyPlus_tests)
list(APPEND OPTIMIZABLE_TARGETS objexx_tests energyplus_tests)
endif()

if(MSVC AND (PROFILE_GENERATE OR PROFILE_USE OR ENABLE_LTO) )
Expand Down Expand Up @@ -260,12 +263,12 @@ elseif (CMAKE_COMPILER_IS_GNUCXX)
if(ENABLE_LTO)
set_target_properties(${OPTIMIZABLE_TARGETS}
PROPERTIES LINK_FLAGS "-flto=7 -fno-use-linker-plugin" COMPILE_FLAGS "-flto=7 -fno-use-linker-plugin")
set_target_properties(EnergyPlus
set_target_properties(energyplus
PROPERTIES LINK_FLAGS "-flto=7 -fuse-linker-plugin -fwhole-program" COMPILE_FLAGS "-flto=7 -fuse-linker-plugin -fwhole-program")
endif()

if (PROFILE_GENERATE)
set_target_properties(${OPTIMIZABLE_TARGETS} EnergyPlus_tests TestEnergyPlusCallbacks
set_target_properties(${OPTIMIZABLE_TARGETS} energyplus_tests TestEnergyPlusCallbacks
PROPERTIES LINK_FLAGS "-fprofile-generate" COMPILE_FLAGS "-fprofile-generate")
endif()

Expand All @@ -277,12 +280,12 @@ elseif (CMAKE_COMPILER_IS_GNUCXX)
if (PROFILE_USE AND ENABLE_LTO)
set_target_properties(${OPTIMIZABLE_TARGETS}
PROPERTIES LINK_FLAGS "-flto=7 -fno-use-linker-plugin -fprofile-use" COMPILE_FLAGS "-flto=7 -fno-use-linker-plugin -fprofile-use")
set_target_properties(EnergyPlus
set_target_properties(energyplus
PROPERTIES LINK_FLAGS "-flto=7 -fuse-linker-plugin -fwhole-program -fprofile-use" COMPILE_FLAGS "-flto=7 -fuse-linker-plugin -fwhole-program -fprofile-use")
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) # Clang
if(ENABLE_LTO)
set_target_properties(EnergyPlus
set_target_properties(energyplus
PROPERTIES LINK_FLAGS "-flto" COMPILE_FLAGS "-flto")
endif()

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ 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.

## Linux

Expand Down Expand Up @@ -61,5 +61,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.

Loading

8 comments on commit 0b5170c

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

MinGWbuild (jasondegraw) - 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.

MinGWbuild (jasondegraw) - 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.

MinGWbuild (jasondegraw) - 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.

MinGWbuild (jasondegraw) - i386-Windows-7-VisualStudio-12: Tests Failed

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.

MinGWbuild (jasondegraw) - 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.

MinGWbuild (jasondegraw) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1122 of 1122 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.

MinGWbuild (jasondegraw) - 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.

MinGWbuild (jasondegraw) - i386-Windows-7-VisualStudio-12: OK (1620 of 1620 tests passed)

Build Badge Test Badge

Please sign in to comment.