Tests/GhsMulti/GhsMultiMultipleProjects/CMakeLists.txt
raw| 1 | # Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
| 2 | # file LICENSE.rst or https://cmake.org/licensing for details. |
| 3 | |
| 4 | cmake_minimum_required(VERSION 3.12 FATAL_ERROR) |
| 5 | |
| 6 | project(test C) |
| 7 | |
| 8 | if(CMAKE_C_COMPILER_ID STREQUAL "GHS") |
| 9 | add_link_options("-non_shared") |
| 10 | endif() |
| 11 | |
| 12 | add_library(lib1 lib1.c) |
| 13 | add_executable(exe1 exe1.c) |
| 14 | target_link_libraries(exe1 lib1) |
| 15 | |
| 16 | add_subdirectory(sub) |
| 17 | add_subdirectory(sub2 examples EXCLUDE_FROM_ALL) |