Skip to content

Commit

Permalink
Add BUILD_IDLC_ONLY option to only build the IDL preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
PetervdPerk-NXP committed Feb 8, 2023
1 parent de27a11 commit 25744ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules")

option(BUILD_IDLC "Build IDL preprocessor" ${not_crosscompiling})
option(BUILD_DDSPERF "Build ddsperf tool" ${not_crosscompiling})
option(BUILD_IDLC_ONLY "Only build the IDLC preprocessor" OFF)

if(BUILD_IDLC_ONLY)
set(BUILD_DDSPERF NO)
set(ENABLE_SECURITY NO)
set(BUILD_EXAMPLES NO)
set(BUILD_IDLC_XTESTS NO)
set(BUILD_TESTING OFF)
endif()

set(CMAKE_C_STANDARD 99)
if(CMAKE_SYSTEM_NAME STREQUAL "VxWorks")
Expand Down
19 changes: 14 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,19 @@ if(NOT ENABLE_SECURITY)
message(STATUS "Building without OMG DDS Security support")
endif()

add_subdirectory(tools)
add_subdirectory(ddsrt)
if(BUILD_IDLC)
if(BUILD_IDLC_ONLY)
add_subdirectory(idl)
add_subdirectory(core)
add_subdirectory(ddsrt)
add_subdirectory(tools/idlc)
add_subdirectory(tools/idlpp)
add_subdirectory(tools/_confgen)
else()
add_subdirectory(tools)
add_subdirectory(ddsrt)
if(BUILD_IDLC)
add_subdirectory(idl)
endif()
add_subdirectory(security)
add_subdirectory(core)
endif()
add_subdirectory(security)
add_subdirectory(core)

0 comments on commit 25744ba

Please sign in to comment.