-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modustoolbox wrapper constructors fixes
- Loading branch information
1 parent
3cfc434
commit 259fc99
Showing
12 changed files
with
322 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
|
||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE ON) | ||
set(CMAKE_C_OUTPUT_EXTENSION_REPLACE ON) | ||
|
||
|
||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) | ||
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | ||
#set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} ${GNUCXX_LIB_PATH}) | ||
|
||
|
||
message(STATUS "CMAKE_INSTALL_RPATH : ${CMAKE_INSTALL_RPATH}") | ||
|
||
|
||
# settings per configuration | ||
set(COMPILER_CXX_FLAGS "${COREDEV_BUILD_MODEL_FLAG} -pedantic -Wall -Wno-long-long -Wno-variadic-macros") | ||
set(COMPILER_CXX_FLAGS_DEBUG "-g -O0 -fprofile-arcs -ftest-coverage") | ||
set(COMPILER_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") | ||
|
||
set(CMAKE_CXX_FLAGS "${COMPILER_CXX_FLAGS_RELEASE}") | ||
set(CMAKE_C_FLAGS "${COMPILER_CXX_FLAGS_RELEASE}") | ||
|
||
set(CMAKE_CXX_FLAGS_DEBUG "${COMPILER_CXX_FLAGS_DEBUG}") | ||
set(CMAKE_C_FLAGS_DEBUG "${COMPILER_CXX_FLAGS_DEBUG}") | ||
|
||
message(STATUS "CMAKE_C_FLAGS_DEBUG : ${CMAKE_C_FLAGS_DEBUG}") | ||
|
||
set(CMAKE_CXX_FLAGS_RELEASE "${COMPILER_CXX_FLAGS_RELEASE}") | ||
set(CMAKE_C_FLAGS_RELEASE "${COMPILER_CXX_FLAGS_RELEASE}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
MACRO( createSimpleTests ) | ||
|
||
set( TestList "" ) | ||
set( LibraryList "" ) | ||
set( SourceList "" ) | ||
set( LabelList "" ) | ||
set( CurrentVar "" ) | ||
|
||
FOREACH( arg ${ARGN} ) | ||
|
||
IF( ${arg} STREQUAL "LIBRARIES" ) | ||
set( CurrentVar "LibraryList" ) | ||
ELSEIF( ${arg} STREQUAL "LABELS" ) | ||
set( CurrentVar "LabelList" ) | ||
ELSEIF( ${arg} STREQUAL "TESTS" ) | ||
set( CurrentVar "TestList" ) | ||
ELSEIF( ${arg} STREQUAL "SOURCES" ) | ||
set( CurrentVar "SourceList" ) | ||
ELSE( ${arg} STREQUAL "LIBRARIES" ) | ||
set( ${CurrentVar} ${${CurrentVar}} ${arg} ) | ||
ENDIF( ${arg} STREQUAL "LIBRARIES" ) | ||
|
||
ENDFOREACH( arg ${ARGN} ) | ||
|
||
|
||
string( TOUPPER ${CMAKE_BUILD_TYPE} MY_LOCAL_BUILD_TYPE ) | ||
|
||
|
||
IF( ${MY_LOCAL_BUILD_TYPE} STREQUAL "DEBUG" ) | ||
|
||
message( STATUS "#############################" ) | ||
message( STATUS "ARGN = ${ARGN}" ) | ||
message( STATUS "TestList = ${TestList}" ) | ||
message( STATUS "LibraryList = ${LibraryList}" ) | ||
message( STATUS "SourceList = ${SourceList}" ) | ||
message( STATUS "LabelList = ${LabelList}" ) | ||
message( STATUS "#############################" ) | ||
|
||
ENDIF( ${MY_LOCAL_BUILD_TYPE} STREQUAL "DEBUG" ) | ||
|
||
|
||
FOREACH( TestName ${TestList} ) | ||
|
||
IF( ${MY_LOCAL_BUILD_TYPE} STREQUAL "DEBUG" ) | ||
|
||
message( STATUS "###" ) | ||
message( STATUS "Testname = ${TestName}" ) | ||
message( STATUS "###" ) | ||
|
||
ENDIF( ${MY_LOCAL_BUILD_TYPE} STREQUAL "DEBUG" ) | ||
|
||
|
||
add_executable( ${TestName} ${TestName} ${SourceList} ) | ||
target_link_libraries( ${TestName} PUBLIC ${LibraryList} ) | ||
|
||
|
||
add_test( NAME ${TestName} | ||
COMMAND ${TestName} ) | ||
|
||
set_tests_properties( ${TestName} | ||
PROPERTIES | ||
LABELS "${LabelList}") | ||
|
||
ENDFOREACH( TestName ${TestList} ) | ||
|
||
ENDMACRO( createSimpleTests ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
|
||
set( GOOGLETEST_LIBRARIES gmock gmock_main gtest gtest_main ) | ||
set( GOOGLETEST_LINK_LIBRARIES ${GOOGLETEST_LIBRARIES} pthread ) | ||
|
||
|
||
if( USE_GLOBAL_GOOGLETEST_INSTALLATION ) | ||
|
||
if( NOT GOOGLETEST_PATH ) | ||
|
||
set( GOOGLETEST_PATH "${CMAKE_SOURCE_DIR}/googletest" ) | ||
message(STATUS "GOOGLETEST_PATH not set, setting it to ${GOOGLETEST_PATH} !") | ||
|
||
endif( NOT GOOGLETEST_PATH ) | ||
|
||
set( GOOGLETEST_INCLUDE_PATH "${GOOGLETEST_PATH}/googlemock/include" "${GOOGLETEST_PATH}/googletest/include" ) | ||
set( GOOGLETEST_LIBRARY_PATH "${GOOGLETEST_PATH}/build/lib" ) | ||
|
||
include_directories( ${GOOGLETEST_INCLUDE_PATH} ) | ||
link_directories( ${GOOGLETEST_LIBRARY_PATH} ) | ||
|
||
|
||
foreach(LIBNAME ${GOOGLETEST_LIBRARIES}) | ||
|
||
add_library( ${LIBNAME} STATIC IMPORTED ) | ||
|
||
set_target_properties( ${LIBNAME} | ||
PROPERTIES | ||
IMPORTED_LOCATION "${GOOGLETEST_LIBRARY_PATH}/lib${LIBNAME}.a" | ||
IMPORTED_LOCATION_RELEASE "${GOOGLETEST_LIBRARY_PATH}/lib${LIBNAME}.a" | ||
IMPORTED_LOCATION_DEBUG "${GOOGLETEST_LIBRARY_PATH}/lib${LIBNAME}.a" | ||
IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" ) | ||
|
||
endforeach(LIBNAME ${GOOGLETEST_LIBRARIES}) | ||
|
||
|
||
else( USE_GLOBAL_GOOGLETEST_INSTALLATION ) | ||
|
||
add_subdirectory( ${CMAKE_SOURCE_DIR}/googletest ) | ||
|
||
endif( USE_GLOBAL_GOOGLETEST_INSTALLATION ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.