Skip to content

Commit

Permalink
Merge pull request #1545 from smartdevicelink/fix/4.3.0_fixes
Browse files Browse the repository at this point in the history
Add important fixes from release/4.3.0 branch
  • Loading branch information
jacobkeeler authored May 17, 2017
2 parents 458fa67 + ead2d48 commit 09e4eac
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 24 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions src/appMain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down
2 changes: 1 addition & 1 deletion src/components/application_manager/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/components/test_main.cc
Original file line number Diff line number Diff line change
@@ -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(""));
Expand Down
18 changes: 7 additions & 11 deletions tools/cmake/helpers/platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tools/cmake/helpers/sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09e4eac

Please sign in to comment.