Skip to content

Commit

Permalink
simplify CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubpa committed Jun 20, 2020
1 parent 99e2937 commit 809e9fa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
18 changes: 2 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,8 @@ cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(UECS VERSION 0.9.5)
message(STATUS "[Project] ${PROJECT_NAME}")

include(FetchContent)
set(UCMake_VERSION 0.5.4)
message(STATUS "find package: UCMake ${UCMake_VERSION}")
find_package(UCMake ${UCMake_VERSION} QUIET)
if(NOT UCMake_FOUND)
message(STATUS "UCMake ${UCMake_VERSION} not found")
set(_address "https://github.com/Ubpa/UCMake")
message(STATUS "fetch: ${_address} with tag ${UCMake_VERSION}")
FetchContent_Declare(
UCMake
GIT_REPOSITORY ${_address}
GIT_TAG ${UCMake_VERSION}
)
FetchContent_MakeAvailable(UCMake)
message(STATUS "UCMake ${UCMake_VERSION} build done")
endif()
include(cmake/InitUCMake.cmake)
Ubpa_InitUCMake()

Ubpa_InitProject()

Expand Down
18 changes: 18 additions & 0 deletions cmake/InitUCMake.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
macro(Ubpa_InitUCMake)
include(FetchContent)
set(UCMake_VERSION 0.5.5)
message(STATUS "find package: UCMake ${UCMake_VERSION}")
find_package(UCMake ${UCMake_VERSION} QUIET)
if(NOT UCMake_FOUND)
message(STATUS "UCMake ${UCMake_VERSION} not found")
set(_address "https://github.com/Ubpa/UCMake")
message(STATUS "fetch: ${_address} with tag ${UCMake_VERSION}")
FetchContent_Declare(
UCMake
GIT_REPOSITORY ${_address}
GIT_TAG ${UCMake_VERSION}
)
FetchContent_MakeAvailable(UCMake)
message(STATUS "UCMake ${UCMake_VERSION} build done")
endif()
endmacro()
2 changes: 2 additions & 0 deletions include/UECS/detail/RTSCmptTraits.inl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include "../RTDCmptTraits.h"

#include <stdexcept>

namespace Ubpa {
inline size_t RTSCmptTraits::Sizeof(CmptType type) const {
assert(sizeofs.find(type) != sizeofs.end());
Expand Down

0 comments on commit 809e9fa

Please sign in to comment.