From e6f38c2792b2000fa470e9a947f68089f07d34c0 Mon Sep 17 00:00:00 2001 From: Michael Brockus <55331536+michaelbadcrumble@users.noreply.github.com> Date: Tue, 17 Sep 2019 12:14:47 -0700 Subject: [PATCH 1/3] Update CMakeLists.txt Moved the add library method into sub dir. Also made this CMakeLists.txt script compatible for versions os CMake starting from 3.x and up. --- CMakeLists.txt | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf74cec..1954949 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,34 +8,15 @@ # License: MIT # # # ################################################################################### -cmake_minimum_required(VERSION 3.13.2.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3 FATAL_ERROR) - -# -# CMake: Declare project -# project(unity LANGUAGES C DESCRIPTION "C Unit testing framework.") - -# -# CMake: Creation of library -# -add_library("unity" STATIC) +add_subdirectory("src") - -# -# CMake: Adding source to target -# -target_sources("unity" PRIVATE "src/unity.c") - - - -# -# CMake: Including directories to target -# target_include_directories("unity" PUBLIC "$" @@ -44,18 +25,8 @@ target_include_directories("unity" PRIVATE "src" ) - - -# -# CMake: Give target an alias -# add_library("unity::framework" ALIAS "unity") - - -# -# CMake: export project -# install(TARGETS "unity" EXPORT "unityConfig" ARCHIVE DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}" From bc7d89a891e19bc004528dfbb6fb42c603bda6d9 Mon Sep 17 00:00:00 2001 From: Michael Brockus <55331536+michaelbadcrumble@users.noreply.github.com> Date: Tue, 17 Sep 2019 12:17:22 -0700 Subject: [PATCH 2/3] Create CMakeLists.txt Added new CMakeLists.txt here in the src dir, moved add library method from root script to sub script. --- src/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..b07a82f --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,16 @@ +################################################################################### +# # +# NAME: CMakeLsits.txt # +# # +# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. # +# WRITTEN BY: Michael Brockus. # +# # +# License: MIT # +# # +################################################################################### +cmake_minimum_required(VERSION 3.13.2.0 FATAL_ERROR) + + +add_library("unity" STATIC) + +target_sources("unity" PRIVATE "unity.c") From 7e3804545c5fc84c84951b8ac2aed49f9686b998 Mon Sep 17 00:00:00 2001 From: Michael Brockus <55331536+michaelbadcrumble@users.noreply.github.com> Date: Sun, 22 Sep 2019 06:59:35 -0700 Subject: [PATCH 3/3] Fixed typo in sub CMakeLists.txt. Fixed a simple mistake. --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b07a82f..4aa2bcb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################################################### # # -# NAME: CMakeLsits.txt # +# NAME: CMakeLists.txt # # # # AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. # # WRITTEN BY: Michael Brockus. #