1+ ## Copyright (c) 2006-2022, Universities Space Research Association (USRA).
2+ ## All rights reserved.
3+ ##
4+ ## Redistribution and use in source and binary forms, with or without
5+ ## modification, are permitted provided that the following conditions are met:
6+ ## * Redistributions of source code must retain the above copyright
7+ ## notice, this list of conditions and the following disclaimer.
8+ ## * Redistributions in binary form must reproduce the above copyright
9+ ## notice, this list of conditions and the following disclaimer in the
10+ ## documentation and/or other materials provided with the distribution.
11+ ## * Neither the name of the Universities Space Research Association nor the
12+ ## names of its contributors may be used to endorse or promote products
13+ ## derived from this software without specific prior written permission.
14+ ##
15+ ## THIS SOFTWARE IS PROVIDED BY USRA ``AS IS'' AND ANY EXPRESS OR IMPLIED
16+ ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17+ ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18+ ## DISCLAIMED. IN NO EVENT SHALL USRA BE LIABLE FOR ANY DIRECT, INDIRECT,
19+ ## INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20+ ## BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
21+ ## OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+ ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
23+ ## TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
24+ ## USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25+
26+ cmake_minimum_required (VERSION 3.6 FATAL_ERROR )
27+
28+ # explicitly set certain policies
29+ cmake_policy (VERSION 3.6 )
30+
31+ project (Plexil
32+ DESCRIPTION "An executive for the PLEXIL language"
33+ LANGUAGES CXX C )
34+
35+ # cmake modules
36+ include (CMakeDependentOption )
37+ include (ExternalProject )
38+ include (GNUInstallDirs )
39+
40+ #
41+ # Options
42+ #
43+
44+ #
45+ # How to build it
46+ option (BUILD_SHARED_LIBS "Build shared instead of static libraries" ON )
47+ #
48+ # What to build
49+ option (UNIVERSAL_EXEC "Build the universalExec application" ON )
50+ option (TEST_EXEC "Build the TestExec application" ON )
51+ option (UDP_ADAPTER "Build adapter for interfacing via UDP" OFF )
52+ option (PLAN_DEBUG_LISTENER "Build the PlanDebugListener module" ON )
53+ option (VIEWER_LISTENER "Build interface for Plexil Viewer" ON )
54+ option (GANTT_LISTENER "Build interface for GANTT chart generator (deprecated)" OFF )
55+ #
56+ # Not strictly exec code
57+ option (STANDALONE_SIMULATOR "Build the StandAloneSimulator application" OFF )
58+ option (MODULE_TESTS "Build unit test executables for submodules" OFF )
59+
60+ #
61+ # Implementation choices
62+ option (POSIX_TIME "Use standard POSIX time functions" ON )
63+ option (JAVA_NATIVE_INTERFACE "Support for calling PlexilExec from Java" OFF )
64+ option (DEBUG_MESSAGES "Support for tracing internals at runtime" ON )
65+
66+ # Dependent options
67+ CMAKE_DEPENDENT_OPTION (IPC_ADAPTER "Build TCA-IPC and adapter for interapp comms" ON
68+ "NOT STANDALONE_SIMULATOR" ON )
69+ CMAKE_DEPENDENT_OPTION (POSIX_THREADS "Include POSIX threading support" ON
70+ "NOT IPC_ADAPTER; NOT UNIVERSAL_EXEC" ON )
71+
72+ # set PlexilExec_SOURCE_DIR to the src subdirectory
73+ set (PlexilExec_SOURCE_DIR ${PROJECT_SOURCE_DIR} /src)
74+ add_subdirectory (src )
0 commit comments