Build: add build type support
Refactor cmake files to support setting the "build type" following CMake
idioms. A "build type" is a set of compiler flags controlling code
optimization and debug information generation. For more information on
the supported types and their meaning please refer to the documentation.
This change extends build type support to external components too. The
build type of each component can be independently controlled using
command line settings. For details about the supported types and
settings, please refer to the cmake file of the external component and
the documentation of the external project.
This change tries to be backwards compatible and selects the default
build type to be "Debug". This may change in the future.
Change-Id: Ic041140bb8d4aaf0f07be9c4cac0638c03996eb5
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/external/CppUTest/CppUTest.cmake b/external/CppUTest/CppUTest.cmake
index 8fd8ab1..7b916d5 100644
--- a/external/CppUTest/CppUTest.cmake
+++ b/external/CppUTest/CppUTest.cmake
@@ -10,6 +10,7 @@
set(CPPUTEST_REFSPEC "v3.8" CACHE STRING "CppUTest git refspec")
set(CPPUTEST_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/CppUTest_install CACHE PATH "CppUTest installation directory")
set(CPPUTEST_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/cpputest-src CACHE PATH "CppUTest source directory")
+set(CPPUTEST_BUILD_TYPE "Release" CACHE STRING "CppUTest build type")
set(GIT_OPTIONS
GIT_REPOSITORY ${CPPUTEST_URL}