Set default BUILD_IDLC based on presence of Maven
This will modify the default behavior to select BUILD_IDLC based on
whether Maven is discovered or not.
The behavior when `-DBUILD_IDLC` is specified on the command line remains
unchanged - the build will maintain the current behavior of failing to
configure if `BUILD_IDLC=ON` and Maven was later not found.
This reverts (part of) commit 860a6aadae
.
Signed-off-by: Scott K Logan <logans@cottsay.net>
This commit is contained in:
parent
ff79941aeb
commit
94524bfd76
3 changed files with 8 additions and 8 deletions
|
@ -23,11 +23,6 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|||
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
# By default the Java-based components get built, but make it possible to disable that: if only the
|
||||
# core library is required, there's no need to build them, and that in turn eliminates the Maven and
|
||||
# JDK dependency.
|
||||
option(BUILD_IDLC "Build IDL preprocessor" ON)
|
||||
|
||||
# By default don't treat warnings as errors, else anyone building it with a different compiler that
|
||||
# just happens to generate a warning, as well as anyone adding or modifying something and making a
|
||||
# small mistake would run into errors. CI builds can be configured differently.
|
||||
|
@ -50,6 +45,12 @@ string(REPLACE " " "-" PROJECT_NAME_DASHED "${PROJECT_NAME_FULL}")
|
|||
string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_CAPS)
|
||||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_SMALL)
|
||||
|
||||
# By default the Java-based components get built, but make it possible to disable that: if only the
|
||||
# core library is required, there's no need to build them, and that in turn eliminates the Maven and
|
||||
# JDK dependency.
|
||||
find_package(Maven 3.0 QUIET)
|
||||
option(BUILD_IDLC "Build IDL preprocessor" ${Maven_FOUND})
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "VxWorks")
|
||||
add_definitions(-std=c99)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue