summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2017-05-17 16:45:51 -0400
committerGitHub <noreply@github.com>2017-05-17 16:45:51 -0400
commit09e4eac5a4f176eba8f98dbb9525f07acccd330f (patch)
tree19634a5c3851e6b41a981c85e86bc296345353b9
parent458fa67468b2c10a7f8eb18277a83eb90c2f8004 (diff)
parentead2d483936b199ec7fddade159cc9c939785b87 (diff)
downloadsdl_core-09e4eac5a4f176eba8f98dbb9525f07acccd330f.tar.gz
Merge pull request #1545 from smartdevicelink/fix/4.3.0_fixes
Add important fixes from release/4.3.0 branch
-rw-r--r--CMakeLists.txt8
-rw-r--r--src/appMain/CMakeLists.txt4
-rw-r--r--src/components/application_manager/test/CMakeLists.txt2
-rw-r--r--src/components/test_main.cc2
-rw-r--r--tools/cmake/helpers/platform.cmake18
-rw-r--r--tools/cmake/helpers/sources.cmake3
6 files changed, 13 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 07dd4e8bea..a813b98a1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,6 @@ if(EXTENDED_POLICY STREQUAL "")
endif()
set(OS_TYPE_OPTION "$ENV{OS_TYPE}")
-set(DEBUG_OPTION "$ENV{DEBUG}")
set(HMI_TYPE_OPTION "$ENV{HMI_TYPE}")
set(TARGET_OPTION "$ENV{TARGET}")
set(MEDIA_MODE_OPTION "$ENV{MEDIA_MODE}")
@@ -110,11 +109,8 @@ if (MEDIA_MODE_OPTION)
endif()
endif()
-if (DEBUG_OPTION)
- if (${DEBUG_OPTION} STREQUAL "DBG_OFF")
- message(STATUS "Jenkins integration: build release version")
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
- endif()
+if( NOT CMAKE_BUILD_TYPE )
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build. Options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
endif()
if (HMI_ADAPTER_OPTION)
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index 88813b5bfb..0b76be34b5 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -137,10 +137,6 @@ if(ENABLE_LOG)
list(APPEND LIBRARIES expat -L${EXPAT_LIBS_DIRECTORY})
endif()
-if( NOT CMAKE_BUILD_TYPE )
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build. Options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
-endif()
-
add_executable(${PROJECT} ${SOURCES})
target_link_libraries(${PROJECT} ${LIBRARIES})
diff --git a/src/components/application_manager/test/CMakeLists.txt b/src/components/application_manager/test/CMakeLists.txt
index 7a7ff12d41..dba8d99a62 100644
--- a/src/components/application_manager/test/CMakeLists.txt
+++ b/src/components/application_manager/test/CMakeLists.txt
@@ -139,7 +139,7 @@ file(COPY smartDeviceLink_test.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/resumption)
file(COPY smartDeviceLink_test.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/resumption)
-create_test("resumption/data_resumption_test" "${ResumptionData_SOURCES}" "${LIBRARIES}")
+create_test("data_resumption_test" "${ResumptionData_SOURCES}" "${LIBRARIES}")
add_subdirectory(state_controller)
add_subdirectory(app_launch)
diff --git a/src/components/test_main.cc b/src/components/test_main.cc
index 66013d78c4..72c90acb5c 100644
--- a/src/components/test_main.cc
+++ b/src/components/test_main.cc
@@ -1,8 +1,8 @@
#include "gmock/gmock.h"
#include "utils/logger.h"
#include "utils/custom_string.h"
-namespace custom_str = utils::custom_string;
int main(int argc, char** argv) {
+ namespace custom_str = utils::custom_string;
testing::InitGoogleMock(&argc, argv);
::testing::DefaultValue<custom_str::CustomString>::Set(
custom_str::CustomString(""));
diff --git a/tools/cmake/helpers/platform.cmake b/tools/cmake/helpers/platform.cmake
index a377dfd042..961b41d689 100644
--- a/tools/cmake/helpers/platform.cmake
+++ b/tools/cmake/helpers/platform.cmake
@@ -74,20 +74,16 @@ function(get_os OS)
endfunction()
function(get_arch ARCH)
- if(ARCH_X86)
+ if( CMAKE_SIZEOF_VOID_P MATCHES 8 )
+ # void ptr = 8 byte --> x86_64
+ set(${ARCH} "x64" PARENT_SCOPE)
+ elseif( CMAKE_SIZEOF_VOID_P MATCHES 4 )
+ # void ptr = 4 byte --> x86
set(${ARCH} "x86" PARENT_SCOPE)
- elseif(ARCH_X64)
- set(${ARCH} "x64" PARENT_SCOPE)
else()
- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386")
- set(${ARCH} "x86" PARENT_SCOPE)
- elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
- set(${ARCH} "x64" PARENT_SCOPE)
- else()
message(FATAL_ERROR "Unsupported architecture")
- endif()
- endif()
-endfunction()
+ endif()
+endfunction(get_arch ARCH)
function(get_sdk SDK)
if(SDK_QT)
diff --git a/tools/cmake/helpers/sources.cmake b/tools/cmake/helpers/sources.cmake
index 0315b905d9..657197eaac 100644
--- a/tools/cmake/helpers/sources.cmake
+++ b/tools/cmake/helpers/sources.cmake
@@ -143,10 +143,11 @@ function(create_test NAME SOURCES LIBS)
endfunction()
function(create_cotired_test NAME SOURCES LIBS)
+ list(APPEND SOURCES
+ ${CMAKE_SOURCE_DIR}/src/components/test_main.cc)
add_executable(
${NAME}
EXCLUDE_FROM_ALL
- ${CMAKE_SOURCE_DIR}/src/components/test_main.cc
${SOURCES}
)
# TODO: Fix problems with Cotire on Windows and Qt APPLINK-28060