Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #812 from zpalmtree/fix-default-build-type
Browse files Browse the repository at this point in the history
Fix cmake not defaulting to release build
  • Loading branch information
brandonlehmann committed May 10, 2019
2 parents 9a504fa + 8ccee93 commit a279a8d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Expand Up @@ -7,6 +7,9 @@ if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()

set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug, Release, RelWithDebInfo")
set(CMAKE_CONFIGURATION_TYPES Debug RelWithDebInfo Release CACHE TYPE INTERNAL)

project(TurtleCoin)

# Required for finding Threads on ARM
Expand Down Expand Up @@ -39,8 +42,6 @@ set(VERSION "0.1")

## This section describes our general CMake setup options
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CONFIGURATION_TYPES Debug RelWithDebInfo Release CACHE TYPE INTERNAL)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug, Release, RelWithDebInfo")
set(CMAKE_SKIP_INSTALL_RULES OFF FORCE)
set(CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY ON FORCE)
set(CMAKE_SUPPRESS_REGENERATION ON)
Expand Down
10 changes: 7 additions & 3 deletions src/CryptoTest/main.cpp
Expand Up @@ -2,8 +2,6 @@
//
// Please see the included LICENSE file for more information.

#undef NDEBUG

#include <iostream>
#include <chrono>
#include <assert.h>
Expand Down Expand Up @@ -167,7 +165,13 @@ void testHashFunction(
}

/* Verify the hash is as expected */
assert(CompareHashes(hash, expectedOutput));
if(!CompareHashes(hash, expectedOutput))
{
std::cout << "Hashes are not equal!\n" << "Expected: " << expectedOutput << "\nActual: " << hash
<< "\nTerminating.";

exit(1);
}
}

/* Bit of hackery so we can get the variable name of the passed in function.
Expand Down

0 comments on commit a279a8d

Please sign in to comment.