Skip to content

Commit

Permalink
Using C_STANDARD 99
Browse files Browse the repository at this point in the history
Use consistence CMAKE_TOOLCHAIN_FILE

Signed-off-by: Yonggang Luo <[email protected]>
  • Loading branch information
lygstate committed Feb 7, 2021
1 parent d5e45bc commit eb3497a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion cmake/iotjs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ endforeach()
iotjs_add_compile_flags(-Wall)
if(NOT USING_MSVC)
iotjs_add_compile_flags(-Wextra -Werror -Wno-unused-parameter)
iotjs_add_compile_flags(-Wsign-conversion -std=gnu99)
iotjs_add_compile_flags(-Wno-sizeof-pointer-memaccess -Wno-unused-variable)
endif()

if(ENABLE_SNAPSHOT)
Expand Down Expand Up @@ -536,6 +536,7 @@ set_target_properties(${TARGET_LIB_IOTJS} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
PUBLIC_HEADER "${IOTJS_PUBLIC_HEADERS}"
C_STANDARD 99
)
target_include_directories(${TARGET_LIB_IOTJS}
PRIVATE ${IOTJS_INCLUDE_DIRS})
Expand Down
5 changes: 1 addition & 4 deletions cmake/libtuv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ if("${TARGET_OS}" STREQUAL "MOCK")
else()
string(TOLOWER ${TARGET_ARCH}-${TARGET_OS} PLATFORM_DESCRIPTOR)
endif()
set(DEPS_TUV_TOOLCHAIN
${DEPS_TUV_SRC}/cmake/config/config_${PLATFORM_DESCRIPTOR}.cmake)
message(STATUS "libtuv toolchain file: ${DEPS_TUV_TOOLCHAIN}")
ExternalProject_Add(libtuv
PREFIX ${DEPS_TUV}
SOURCE_DIR ${DEPS_TUV_SRC}
Expand All @@ -35,7 +32,7 @@ ExternalProject_Add(libtuv
${CMAKE_BINARY_DIR}/${DEPS_TUV}/lib/${CONFIG_TYPE}/
${CMAKE_BINARY_DIR}/lib/
CMAKE_ARGS
-DCMAKE_TOOLCHAIN_FILE=${DEPS_TUV_TOOLCHAIN}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DTARGET_PLATFORM=${PLATFORM_DESCRIPTOR}
Expand Down

0 comments on commit eb3497a

Please sign in to comment.